geeksbot

package module
v0.0.118 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2021 License: MIT Imports: 2 Imported by: 0

README

# Geeksbot

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Channel

type Channel struct {
	ID        string
	Guild     Guild
	Admin     bool
	Default   bool
	NewPatron bool
}

type ChannelService

type ChannelService interface {
	Channel(id string) (Channel, error)
	CreateChannel(c Channel) (Channel, error)
	DeleteChannel(c Channel) error
	GuildChannels(g Guild) ([]Channel, error)
	UpdateChannel(c Channel) (Channel, error)
	GetOrCreateChannel(id string, guild_id string) (Channel, error)
}

type Comment

type Comment struct {
	ID        int64
	Author    User
	Request   Request
	CommentAt time.Time
	Content   string
}

type Guild

type Guild struct {
	ID               string
	NewPatronMessage sql.NullString
	Prefixes         []string
}

type GuildService

type GuildService interface {
	Guild(id string) (Guild, error)
	CreateGuild(g Guild) (Guild, error)
	DeleteGuild(g Guild) error
	UpdateGuild(g Guild) (Guild, error)
	GuildRoles(g Guild) ([]Role, error)
	CreateRole(r Role) (Role, error)
	Role(id string) (Role, error)
	UpdateRole(r Role) (Role, error)
	DeleteRole(r Role) error
	GetOrCreateGuild(id string) (Guild, error)
	CreateOrUpdateRole(r Role) (Role, error)
}

type Message

type Message struct {
	ID              string
	CreatedAt       time.Time
	ModifiedAt      sql.NullTime
	Content         string
	PreviousContent []string
	Channel         Channel
	Author          User
}

type MessageService

type MessageService interface {
	Message(id string) (Message, error)
	CreateMessage(m Message) (Message, error)
	DeleteMessage(m Message) error
	ChannelMessages(c Channel) ([]Message, error)
	UpdateMessage(m Message) (Message, error)
}

type PatreonCreator

type PatreonCreator struct {
	ID      int
	Creator string
	Link    string
	Guild   Guild
}

type PatreonService

type PatreonService interface {
	PatreonCreatorByID(id int) (PatreonCreator, error)
	PatreonCreatorByName(name string, guild Guild) (PatreonCreator, error)
	CreatePatreonCreator(c PatreonCreator) (PatreonCreator, error)
	UpdatePatreonCreator(c PatreonCreator) (PatreonCreator, error)
	DeletePatreonCreator(c PatreonCreator) error
	PatreonTierByID(id int) (PatreonTier, error)
	PatreonTierByName(name string, creator string) (PatreonTier, error)
	CreatePatreonTier(t PatreonTier) (PatreonTier, error)
	UpdatePatreonTier(t PatreonTier) (PatreonTier, error)
	DeletePatreonTier(t PatreonTier) error
	GuildPatreonCreators(g Guild) ([]PatreonCreator, error)
	CreatorPatreonTiers(c PatreonCreator) ([]PatreonTier, error)
}

type PatreonTier

type PatreonTier struct {
	ID          int
	Name        string
	Description sql.NullString
	Creator     PatreonCreator
	Role        Role
	NextTier    *PatreonTier
}

type Request

type Request struct {
	ID               int64
	Author           User
	Channel          Channel
	Guild            Guild
	Content          string
	RequestedAt      time.Time
	Completed        bool
	CompletedAt      sql.NullTime
	CompletedBy      *User
	Message          Message
	CompletedMessage sql.NullString
}

type RequestService

type RequestService interface {
	Request(id int64) (Request, error)
	UserRequests(u User, completed bool) ([]Request, error)
	GuildRequests(g Guild, completed bool) ([]Request, error)
	CreateRequest(r Request) (Request, error)
	UpdateRequest(r Request) (Request, error)
	DeleteRequest(r Request) error
	Comment(id int64) (Comment, error)
	RequestComments(r Request) ([]Comment, error)
	RequestCommentCount(r Request) (int, error)
	CreateComment(c Comment) (Comment, error)
	DeleteComment(c Comment) error
}

type Role

type Role struct {
	ID       string
	RoleType string
	Guild    Guild
}

type Server

type Server struct {
	ID              int
	Name            string
	IPAddr          string
	Port            int
	Password        string
	AlertsChannel   *Channel
	Guild           Guild
	InfoChannel     *Channel
	InfoMessage     *Message
	SettingsMessage *Message
	FTPPort         int
	FTPUser         string
	FTPPass         string
}

type ServerService

type ServerService interface {
	ServerByID(id int) (Server, error)
	ServerByName(name string, guild Guild) (Server, error)
	CreateServer(s Server) (Server, error)
	DeleteServer(s Server) error
	UpdateServer(s Server) (Server, error)
	GuildServers(g Guild) ([]Server, error)
}

type User

type User struct {
	ID       string
	SteamID  sql.NullString
	IsActive bool
	IsStaff  bool
	IsAdmin  bool
}

type UserService

type UserService interface {
	User(id string) (User, error)
	CreateUser(u User) (User, error)
	DeleteUser(u User) error
	UpdateUser(u User) (User, error)
	GetOrCreateUser(id string) (User, error)
	GetBySteamID(steamID string) (User, error)
}

Directories

Path Synopsis
cmd
internal
pkg
database/migrations
Code generated for package migrations by go-bindata DO NOT EDIT.
Code generated for package migrations by go-bindata DO NOT EDIT.

Jump to

Keyboard shortcuts

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