Compare commits

...

6 Commits

Author SHA1 Message Date
jolheiser 3a2804df4c
Change module
Signed-off-by: jolheiser <john.olheiser@gmail.com>
2022-01-07 14:13:36 -06:00
Etzelia 05b38710c5 Add Discord ID to Player (#1)
Add Discord ID to Player

Signed-off-by: Etzelia <etzelia@hotmail.com>

Reviewed-on: https://git.canopymc.net/Etzelia/go-mcm/pulls/1
Co-Authored-By: Etzelia <etzelia@hotmail.com>
Co-Committed-By: Etzelia <etzelia@hotmail.com>
2021-07-20 23:43:32 +00:00
Etzelia d2b27d7edf
Update module
Signed-off-by: Etzelia <etzelia@hotmail.com>
2021-07-13 18:28:16 -05:00
Etzelia e1ed806ef6
Update module
Signed-off-by: Etzelia <etzelia@hotmail.com>
2021-05-04 22:17:40 -05:00
Etzelia 40808d69ca Update 'go.mod' 2021-05-05 03:13:15 +00:00
Etzelia d78d4ddf9f Fix Eq query (#5)
Fix Eq query

Signed-off-by: Etzelia <etzelia@hotmail.com>

Reviewed-on: https://git.etztech.xyz/Etzelia/go-mcm/pulls/5
2020-10-17 06:21:18 +02:00
18 changed files with 30 additions and 28 deletions

View File

@ -8,9 +8,9 @@ package main
import ( import (
"fmt" "fmt"
"go.etztech.xyz/go-mcm" "git.canopymc.net/Etzelia/go-mcm"
"go.etztech.xyz/go-mcm/model" "git.canopymc.net/Etzelia/go-mcm/model"
"go.etztech.xyz/go-mcm/model/django" "git.canopymc.net/Etzelia/go-mcm/model/django"
) )
func main() { func main() {

2
go.mod
View File

@ -1,3 +1,3 @@
module go.etztech.xyz/go-mcm module git.jojodev.com/Minecraft/go-mcm
go 1.13 go 1.13

4
mcm.go
View File

@ -4,8 +4,8 @@ import (
"fmt" "fmt"
"strings" "strings"
"go.etztech.xyz/go-mcm/model" "git.jojodev.com/Minecraft/go-mcm/model"
"go.etztech.xyz/go-mcm/web" "git.jojodev.com/Minecraft/go-mcm/web"
) )
type MCM struct { type MCM struct {

View File

@ -3,8 +3,8 @@ package model
import ( import (
"encoding/json" "encoding/json"
"go.etztech.xyz/go-mcm/internal" "git.jojodev.com/Minecraft/go-mcm/internal"
"go.etztech.xyz/go-mcm/model/django" "git.jojodev.com/Minecraft/go-mcm/model/django"
) )
type Alert struct { type Alert struct {

View File

@ -3,8 +3,8 @@ package model
import ( import (
"encoding/json" "encoding/json"
"go.etztech.xyz/go-mcm/internal" "git.jojodev.com/Minecraft/go-mcm/internal"
"go.etztech.xyz/go-mcm/model/django" "git.jojodev.com/Minecraft/go-mcm/model/django"
) )
type Application struct { type Application struct {

View File

@ -25,7 +25,7 @@ func (db *Builder) QueryString() string {
} }
func (db *Builder) Eq(field Field, value interface{}) *Builder { func (db *Builder) Eq(field Field, value interface{}) *Builder {
db.Params = append(db.Params, fmt.Sprintf("%__eq=%v", field, value)) db.Params = append(db.Params, fmt.Sprintf("%s__eq=%v", field, value))
return db return db
} }

View File

@ -8,5 +8,6 @@ const (
PlayerApplicationID Field = "application_id" PlayerApplicationID Field = "application_id"
PlayerFirstSeen Field = "first_seen" PlayerFirstSeen Field = "first_seen"
PlayerLastSeen Field = "last_seen" PlayerLastSeen Field = "last_seen"
PlayerDiscordID Field = "discord_id"
PlayerLink = Link PlayerLink = Link
) )

View File

@ -3,8 +3,8 @@ package model
import ( import (
"encoding/json" "encoding/json"
"go.etztech.xyz/go-mcm/internal" "git.jojodev.com/Minecraft/go-mcm/internal"
"go.etztech.xyz/go-mcm/model/django" "git.jojodev.com/Minecraft/go-mcm/model/django"
) )
type IP struct { type IP struct {

View File

@ -6,7 +6,7 @@ import (
"reflect" "reflect"
"strings" "strings"
"go.etztech.xyz/go-mcm/model/django" "git.jojodev.com/Minecraft/go-mcm/model/django"
) )
type Model struct { type Model struct {

View File

@ -3,8 +3,8 @@ package model
import ( import (
"encoding/json" "encoding/json"
"go.etztech.xyz/go-mcm/internal" "git.jojodev.com/Minecraft/go-mcm/internal"
"go.etztech.xyz/go-mcm/model/django" "git.jojodev.com/Minecraft/go-mcm/model/django"
) )
type Importance string type Importance string

View File

@ -3,8 +3,8 @@ package model
import ( import (
"encoding/json" "encoding/json"
"go.etztech.xyz/go-mcm/internal" "git.jojodev.com/Minecraft/go-mcm/internal"
"go.etztech.xyz/go-mcm/model/django" "git.jojodev.com/Minecraft/go-mcm/model/django"
) )
type Player struct { type Player struct {
@ -15,6 +15,7 @@ type Player struct {
ApplicationID int64 `json:"application_id"` ApplicationID int64 `json:"application_id"`
FirstSeen string `json:"first_seen"` FirstSeen string `json:"first_seen"`
LastSeen string `json:"last_seen"` LastSeen string `json:"last_seen"`
DiscordID string `json:"discord_id"`
Link string `json:"link"` Link string `json:"link"`
model *Model `json:"-"` model *Model `json:"-"`

View File

@ -3,8 +3,8 @@ package model
import ( import (
"encoding/json" "encoding/json"
"go.etztech.xyz/go-mcm/internal" "git.jojodev.com/Minecraft/go-mcm/internal"
"go.etztech.xyz/go-mcm/model/django" "git.jojodev.com/Minecraft/go-mcm/model/django"
) )
type Priority string type Priority string

View File

@ -3,8 +3,8 @@ package model
import ( import (
"encoding/json" "encoding/json"
"go.etztech.xyz/go-mcm/internal" "git.jojodev.com/Minecraft/go-mcm/internal"
"go.etztech.xyz/go-mcm/model/django" "git.jojodev.com/Minecraft/go-mcm/model/django"
) )
type TicketNote struct { type TicketNote struct {

View File

@ -3,8 +3,8 @@ package model
import ( import (
"encoding/json" "encoding/json"
"go.etztech.xyz/go-mcm/internal" "git.jojodev.com/Minecraft/go-mcm/internal"
"go.etztech.xyz/go-mcm/model/django" "git.jojodev.com/Minecraft/go-mcm/model/django"
) )
type Results int64 type Results int64

View File

@ -3,7 +3,7 @@ package web
import ( import (
"net/url" "net/url"
"go.etztech.xyz/go-mcm/internal" "git.jojodev.com/Minecraft/go-mcm/internal"
) )
func (web *Web) Alert(message string, ping bool) (*internal.Status, error) { func (web *Web) Alert(message string, ping bool) (*internal.Status, error) {

View File

@ -3,7 +3,7 @@ package web
import ( import (
"net/url" "net/url"
"go.etztech.xyz/go-mcm/internal" "git.jojodev.com/Minecraft/go-mcm/internal"
) )
func (web *Web) Discord(message string, ping bool) (*internal.Status, error) { func (web *Web) Discord(message string, ping bool) (*internal.Status, error) {

View File

@ -4,7 +4,7 @@ import (
"encoding/json" "encoding/json"
"fmt" "fmt"
"go.etztech.xyz/go-mcm/internal" "git.jojodev.com/Minecraft/go-mcm/internal"
) )
type Log struct { type Log struct {

View File

@ -4,7 +4,7 @@ import (
"encoding/json" "encoding/json"
"fmt" "fmt"
"go.etztech.xyz/go-mcm/internal" "git.jojodev.com/Minecraft/go-mcm/internal"
) )
type Online struct { type Online struct {