structs

package
v0.0.0-...-0b10f05 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 2, 2022 License: GPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrBadVersion = errors.New("Bad Version Data")
)

Functions

This section is empty.

Types

type SocketRequest

type SocketRequest struct {
	Command string
	User    *UserData
	Data    map[string]interface{}
}

type SocketReturn

type SocketReturn struct {
	StatusCode   uint32
	ErrorMessage string
	TellAll      bool
	Data         map[string]interface{}
}

type UserData

type UserData struct {
	ID          uint64
	Name        string
	Icon        string
	IsAdmin     bool
	Permissions []string
}

func GetUserData

func GetUserData(in *pb.UserData) *UserData

func (*UserData) HasPermission

func (u *UserData) HasPermission(name string) bool

type Version

type Version struct {
	Major  uint8 `json:"major"`
	Minor  uint8 `json:"minor"`
	Hotfix uint8 `json:"hotfix"`
}

func FileToVersion

func FileToVersion(file string) (Version, error)

func StringToVersion

func StringToVersion(v string) (Version, error)

func (Version) EqualTo

func (v Version) EqualTo(c Version) bool

func (Version) EqualToHotfix

func (v Version) EqualToHotfix(c Version) bool

func (Version) GreaterThan

func (v Version) GreaterThan(c Version) bool

func (Version) GreaterThanOrEqualTo

func (v Version) GreaterThanOrEqualTo(c Version) bool

func (Version) LessThan

func (v Version) LessThan(c Version) bool

func (Version) LessThanOrEqualTo

func (v Version) LessThanOrEqualTo(c Version) bool

func (Version) String

func (v Version) String() string

func (Version) ToProto

func (v Version) ToProto() *pb.Version

type WebRequest

type WebRequest struct {
	Path          string
	BasePath      string
	User          *UserData
	SessionToken  string
	Method        string
	QueryParams   map[string]interface{}
	Post          map[string]interface{}
	PathVariables map[string]interface{}
}

type WebReturn

type WebReturn struct {
	StatusCode     uint32
	ErrorMessage   string
	FilePath       string
	PageString     string
	PageData       map[string]interface{}
	CustomPageName string
	CustomCss      []string
	CustomJs       []string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL