moulbot

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2022 License: Apache-2.0, MIT Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Opts

type Opts struct {
	Context context.Context
	Logger  *zap.Logger
	DevMode bool

	EnableDiscord       bool
	DiscordToken        string
	DiscordAdminChannel string

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

	EnableGitHub       bool
	GitHubMoulToken    string
	GitHubMoulbotToken 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(opts Opts) Service

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(error)

func (*Service) CloseGitHub

func (svc *Service) CloseGitHub(error)

func (*Service) CloseServer

func (svc *Service) CloseServer(error)

func (*Service) Ping

func (*Service) ServerListenerAddr

func (svc *Service) ServerListenerAddr() string

func (*Service) StartDiscord

func (svc *Service) StartDiscord() error

func (*Service) StartGitHub

func (svc *Service) StartGitHub() error

func (*Service) StartServer

func (svc *Service) StartServer() error

Jump to

Keyboard shortcuts

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