admin

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2019 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdminServer

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

func NewTcpAdminServer

func NewTcpAdminServer(addr string, usrRepo *authStuff.UserRepo, accRepo *accounts.AccountRepo, bevRepo *beverages.BeverageRepo, perms *permissions.Permissions) (*AdminServer, error)

func NewTlsAdminServer

func NewTlsAdminServer(addr, certPath, keyPath, caCertPath string, tlsClientcertRequired bool, usrRepo *authStuff.UserRepo, accRepo *accounts.AccountRepo, bevRepo *beverages.BeverageRepo, perms *permissions.Permissions) (*AdminServer, error)

func NewUnixAdminServer

func NewUnixAdminServer(pathToSocket string, usrRepo *authStuff.UserRepo, accRepo *accounts.AccountRepo, bevRepo *beverages.BeverageRepo, perms *permissions.Permissions) (*AdminServer, error)

func (*AdminServer) Close

func (as *AdminServer) Close() error

func (*AdminServer) StartAccepting

func (as *AdminServer) StartAccepting()

type Command

type Command struct {
	Type    string          `json:"type"`
	Payload json.RawMessage `json:"cmd"`
}

type DeleteUserCommand

type DeleteUserCommand struct {
	Name string
}

type ListAccountsCommand

type ListAccountsCommand struct {
	Name string //Username optional to filter for
}

type ListBeveragesCommand

type ListBeveragesCommand struct {
	Name string //Username optional to filter for
}

type ListTransactionssCommand

type ListTransactionssCommand struct {
	ID1  string    //Username optional to filter for
	ID2  string    //Username optional to filter for
	From time.Time //Oldest transaction
	To   time.Time //Newest transaction
}

type ListUsersCommand

type ListUsersCommand struct {
}

type PerformBackupCommand

type PerformBackupCommand struct {
	Path string
}

Jump to

Keyboard shortcuts

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