collections

package
v0.0.0-...-4768424 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Name

type Name struct {
	Name string
}

Name represents a name

type RoleDesc

type RoleDesc struct {
	Role string `toml:"role" json:"role"`
	Desc string `toml:"desc" json:"desc"`
}

todo: make AllowedRoles a json representation https://github.com/go-gorm/datatypes RoleDesc is a role tag and description

type Server

type Server struct {
	//Server ID(GuildID under Discord API)
	ID            string `gorm: primary_key`
	Name          string
	RoleChannel   string
	AllowedRoles  []byte
	ElevatedRoles []byte
	RouletteNames []byte
}

Server represents server info pertinent to Rinako on Discord

func (Server) IsEmpty

func (s Server) IsEmpty() bool

func (*Server) ToInfo

func (s *Server) ToInfo() ServerInfo

type ServerInfo

type ServerInfo struct {
	ID            string
	Name          string
	RoleChannel   string
	AllowedRoles  []RoleDesc
	ElevatedRoles []string
	RouletteNames []string
}

ServerInfo represents server info pertinent to Rinako on Discord

func (ServerInfo) IsEmpty

func (s ServerInfo) IsEmpty() bool

type User

type User struct {
	ID       string `gorm: primary_key`
	Names    []Name
	Targeted bool
}

User represents information about a user pertinent to Rinako

Jump to

Keyboard shortcuts

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