cmdroutes

package
v0.0.0-...-3cf2f40 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2019 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

--- Test route for verification process --------------------------------------------------------------------------------- TODO Remove test route

--- cmd specific functions which are best to remain within the package ---------------------------------------------------------------------------

Index

Constants

View Source
const DbSetupDescription = "Creates necessary tables in database"
View Source
const DbSetupRoute = "dbsetup"
View Source
const DbUpdateDescription = "Creates necessary tables in database"
View Source
const DbUpdateRoute = "dbupdate"
View Source
const RequestDescription = "Creates web request"
View Source
const RequestRoute = "request"
View Source
const TestDescription = "Test Route"
View Source
const TestRoute = "test"

Variables

This section is empty.

Functions

func EnterAsset

func EnterAsset(l LocalContext, prompt string) string

--- Obtain asset identification ----------------------------------------------------------------

func EnterEmail

func EnterEmail(l LocalContext) string

--- Obtain email address ----------------------------------------------------------------------

func EnterInvoice

func EnterInvoice(l LocalContext, asset string, assetDesc string) string

--- Obtain invoice number ----------------------------------------------------------------------

func GenericQuery

func GenericQuery(l LocalContext, prompt string) string

--- Generic input text query -------------------------------------------------------------------

func GetInvoice

func GetInvoice(l LocalContext, prompt string) string

--- Queries user for invoice input ------------------------------------------------------------- TODO Test Function

func NewHelpRoute

func NewHelpRoute(router *exrouter.Route) *cmdHelp

func NextMessageCreateC

func NextMessageCreateC(s *discordgo.Session) chan *discordgo.MessageCreate

NextMessageCreateC returns a channel for the next MessageCreate event

func NextMessageReactionAddC

func NextMessageReactionAddC(s *discordgo.Session) chan *discordgo.MessageReactionAdd

NextMessageReactionAddC returns a channel for the next MessageReactionAdd event

func QueryInput

func QueryInput(channel *discordgo.Channel, ctx *exrouter.Context, prompt string, timeout time.Duration) (*discordgo.Message, error)

func RegisterRoutes

func RegisterRoutes(router *exrouter.Route, routes ...Route)

Types

type AddUser

type AddUser struct {
	// contains filtered or unexported fields
}

func NewAddUser

func NewAddUser(di di.Container) *AddUser

func (*AddUser) GetCommand

func (a *AddUser) GetCommand() string

func (*AddUser) GetDescription

func (a *AddUser) GetDescription() string

func (*AddUser) Handle

func (a *AddUser) Handle(ctx *exrouter.Context)

type Avatar

type Avatar struct{}

func NewAvatar

func NewAvatar() *Avatar

func (*Avatar) GetCommand

func (a *Avatar) GetCommand() string

func (*Avatar) GetDescription

func (a *Avatar) GetDescription() string

func (*Avatar) Handle

func (a *Avatar) Handle(ctx *exrouter.Context)

type CmdRouteDataAccessObject

type CmdRouteDataAccessObject struct{}
var CmdRouteDAO *CmdRouteDataAccessObject

type CustomRouteHandler

type CustomRouteHandler interface {
	Register(router *exrouter.Route) *exrouter.Route
}

type DbSetup

type DbSetup struct {
	// contains filtered or unexported fields
}

func NewDbSetup

func NewDbSetup(di di.Container) *DbSetup

func (*DbSetup) GetCommand

func (ds *DbSetup) GetCommand() string

func (*DbSetup) GetDescription

func (ds *DbSetup) GetDescription() string

func (*DbSetup) Handle

func (ds *DbSetup) Handle(ctx *exrouter.Context)

type DbUpdate

type DbUpdate struct {
	// contains filtered or unexported fields
}

func NewDbUpdate

func NewDbUpdate(di di.Container) *DbUpdate

func (*DbUpdate) GetCommand

func (e *DbUpdate) GetCommand() string

func (*DbUpdate) GetDescription

func (e *DbUpdate) GetDescription() string

func (*DbUpdate) Handle

func (e *DbUpdate) Handle(ctx *exrouter.Context)

type DefaultRouteHandler

type DefaultRouteHandler interface {
	Handle(ctx *exrouter.Context)
}

type DirectMessage

type DirectMessage struct{}

func NewDirectMessage

func NewDirectMessage() *DirectMessage

func (*DirectMessage) GetCommand

func (d *DirectMessage) GetCommand() string

func (*DirectMessage) GetDescription

func (d *DirectMessage) GetDescription() string

func (*DirectMessage) Handle

func (d *DirectMessage) Handle(ctx *exrouter.Context)

type ExampleSubRoute

type ExampleSubRoute struct {
	// contains filtered or unexported fields
}

func NewSubRoute

func NewSubRoute(di di.Container) *ExampleSubRoute

func (*ExampleSubRoute) GetCommand

func (u *ExampleSubRoute) GetCommand() string

func (*ExampleSubRoute) GetDescription

func (u *ExampleSubRoute) GetDescription() string

func (*ExampleSubRoute) GetSubRoutes

func (u *ExampleSubRoute) GetSubRoutes() []Route

func (*ExampleSubRoute) Handle

func (u *ExampleSubRoute) Handle(ctx *exrouter.Context)

type Invoices

type Invoices struct {
	PriceExvat   string    `json:"price_exvat"`
	Downloaded   string    `json:"downloaded"`
	Date         time.Time `json:"date"`
	Quantity     string    `json:"quantity"`
	Reason       string    `json:"reason"`
	OtherLicense string    `json:"other_license"`
	Package      string    `json:"package"`
	Currency     string    `json:"currency"`
	Refunded     string    `json:"refunded"`
	Invoice      string    `json:"invoice"`
}

type ListRoles

type ListRoles struct {
	// contains filtered or unexported fields
}

func NewListRoles

func NewListRoles(di di.Container) *ListRoles

func (*ListRoles) GetCommand

func (p *ListRoles) GetCommand() string

func (*ListRoles) GetDescription

func (p *ListRoles) GetDescription() string

func (*ListRoles) Handle

func (p *ListRoles) Handle(ctx *exrouter.Context)

type Ping

type Ping struct{}

func NewPing

func NewPing() *Ping

func (*Ping) GetCommand

func (p *Ping) GetCommand() string

func (*Ping) GetDescription

func (p *Ping) GetDescription() string

func (*Ping) Handle

func (p *Ping) Handle(ctx *exrouter.Context)

type Request

type Request struct {
	// contains filtered or unexported fields
}

func NewRequest

func NewRequest(di di.Container) *Request

func (*Request) GetCommand

func (r *Request) GetCommand() string

func (*Request) GetDescription

func (r *Request) GetDescription() string

func (*Request) Handle

func (r *Request) Handle(ctx *exrouter.Context)

type Route

type Route interface {
	GetCommand() string
	GetDescription() string
}

type SubRoute

type SubRoute interface {
	Route
	GetSubRoutes() []Route
}

type Test

type Test struct {
	// contains filtered or unexported fields
}

func NewTest

func NewTest(di di.Container) *Test

func (*Test) GetCommand

func (t *Test) GetCommand() string

func (*Test) GetDescription

func (t *Test) GetDescription() string

func (*Test) Handle

func (t *Test) Handle(ctx *exrouter.Context)

type User

type User struct {
	// contains filtered or unexported fields
}

func NewUser

func NewUser(di di.Container) *User

func (*User) GetCommand

func (u *User) GetCommand() string

func (*User) GetDescription

func (u *User) GetDescription() string

func (*User) Handle

func (u *User) Handle(ctx *exrouter.Context)

func (*User) Register

func (u *User) Register(router *exrouter.Route) *exrouter.Route

type Verify

type Verify struct {
	// contains filtered or unexported fields
}

func NewVerify

func NewVerify(di di.Container) *Verify

func (*Verify) GetCommand

func (d *Verify) GetCommand() string

--- Setup methods --------------------------------------------------------------------------------------------------------------------------------

func (*Verify) GetDescription

func (d *Verify) GetDescription() string

func (*Verify) Handle

func (d *Verify) Handle(ctx *exrouter.Context)

--- Module execution : Take input from user (invoice), verify purchase against Unity Asset Store API and apply Discord permission ----------------

Jump to

Keyboard shortcuts

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