Documentation ¶
Index ¶
- func DBInit(db *gorm.DB, sfn *snowflake.Node) error
- type Opts
- type Service
- func (svc *Service) AuthFuncOverride(ctx context.Context, path string) (context.Context, error)
- func (svc *Service) Close()
- func (svc *Service) CloseDiscord(err error)
- func (svc *Service) CloseServer(err error)
- func (svc *Service) Ping(context.Context, *sgtmpb.Ping_Request) (*sgtmpb.Ping_Response, error)
- func (svc *Service) PostList(context.Context, *sgtmpb.PostList_Request) (*sgtmpb.PostList_Response, error)
- func (svc *Service) Register(ctx context.Context, input *sgtmpb.Register_Request) (*sgtmpb.Register_Response, error)
- func (svc *Service) ServerListenerAddr() string
- func (svc *Service) StartDiscord() error
- func (svc *Service) StartServer() error
- func (svc *Service) Status(context.Context, *sgtmpb.Status_Request) (*sgtmpb.Status_Response, error)
- func (svc *Service) UserList(context.Context, *sgtmpb.UserList_Request) (*sgtmpb.UserList_Response, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) AuthFuncOverride ¶
func (*Service) CloseDiscord ¶
func (*Service) CloseServer ¶
func (*Service) Ping ¶
func (svc *Service) Ping(context.Context, *sgtmpb.Ping_Request) (*sgtmpb.Ping_Response, error)
func (*Service) PostList ¶ added in v1.16.1
func (svc *Service) PostList(context.Context, *sgtmpb.PostList_Request) (*sgtmpb.PostList_Response, error)
func (*Service) Register ¶ added in v1.16.1
func (svc *Service) Register(ctx context.Context, input *sgtmpb.Register_Request) (*sgtmpb.Register_Response, error)
func (*Service) ServerListenerAddr ¶
func (*Service) StartDiscord ¶
func (*Service) StartServer ¶
func (*Service) Status ¶
func (svc *Service) Status(context.Context, *sgtmpb.Status_Request) (*sgtmpb.Status_Response, error)
func (*Service) UserList ¶ added in v1.16.1
func (svc *Service) UserList(context.Context, *sgtmpb.UserList_Request) (*sgtmpb.UserList_Response, error)
Click to show internal directories.
Click to hide internal directories.