sgtm

package
v1.16.1 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2020 License: Apache-2.0, MIT Imports: 45 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DBInit added in v1.16.1

func DBInit(db *gorm.DB, sfn *snowflake.Node) error

Types

type Opts

type Opts struct {
	Context       context.Context
	Logger        *zap.Logger
	DevMode       bool
	JWTSigningKey string
	Snowflake     *snowflake.Node

	EnableDiscord       bool
	DiscordToken        string
	DiscordAdminChannel string
	DiscordClientID     string
	DiscordClientSecret string

	DBPath string

	EnableServer             bool
	ServerBind               string
	ServerCORSAllowedOrigins string
	ServerRequestTimeout     time.Duration
	ServerShutdownTimeout    time.Duration
	ServerWithPprof          bool
	Hostname                 string
}

func DefaultOpts

func DefaultOpts() Opts

func (Opts) Filtered

func (opts Opts) Filtered() Opts

type Service

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

func New

func New(db *gorm.DB, opts Opts) (Service, error)

func (*Service) AuthFuncOverride

func (svc *Service) AuthFuncOverride(ctx context.Context, path string) (context.Context, error)

func (*Service) Close

func (svc *Service) Close()

func (*Service) CloseDiscord

func (svc *Service) CloseDiscord(err error)

func (*Service) CloseServer

func (svc *Service) CloseServer(err error)

func (*Service) Ping

func (*Service) PostList added in v1.16.1

func (*Service) Register added in v1.16.1

func (*Service) ServerListenerAddr

func (svc *Service) ServerListenerAddr() string

func (*Service) StartDiscord

func (svc *Service) StartDiscord() error

func (*Service) StartServer

func (svc *Service) StartServer() error

func (*Service) Status

func (*Service) UserList added in v1.16.1

Jump to

Keyboard shortcuts

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