Initial types and interfaces
This commit is contained in:
7
datatypes/character.go
Normal file
7
datatypes/character.go
Normal file
@ -0,0 +1,7 @@
|
||||
package datatypes
|
||||
|
||||
// Character represents something that can be skinned
|
||||
type Character struct {
|
||||
Name string `json:"name"`
|
||||
Skin Skin `json:"skin"`
|
||||
}
|
11
datatypes/skin.go
Normal file
11
datatypes/skin.go
Normal file
@ -0,0 +1,11 @@
|
||||
package datatypes
|
||||
|
||||
// Skin struct holds the
|
||||
type Skin struct {
|
||||
Name string `json:"name"`
|
||||
Location string `json:"location"`
|
||||
Metadata map[string]string `json:"metadata"`
|
||||
}
|
||||
|
||||
// Skins are an array of Skin
|
||||
type Skins []Skin
|
7
datatypes/user.go
Normal file
7
datatypes/user.go
Normal file
@ -0,0 +1,7 @@
|
||||
package datatypes
|
||||
|
||||
// User is an object representing a user
|
||||
type User struct {
|
||||
UID string `json:"uid"`
|
||||
OwnedSkins Skins `json:"skins"`
|
||||
}
|
Reference in New Issue
Block a user