Documentation ¶
Index ¶
- type Builder
- func (b *Builder) Build() (Webhook, error)
- func (b *Builder) SetAuthMethodsCallback(authMethodsCallback callback.AuthMethods) *Builder
- func (b *Builder) SetLogger(logger logger.Logger) *Builder
- func (b *Builder) SetPassword(password string) *Builder
- func (b *Builder) SetPasswordVerifyCallback(passwordVerifyCallback callback.PasswordVerify) *Builder
- func (b *Builder) SetUsername(username string) *Builder
- type Impl
- type Webhook
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
func (*Builder) SetAuthMethodsCallback ¶
func (b *Builder) SetAuthMethodsCallback(authMethodsCallback callback.AuthMethods) *Builder
SetAuthMethodsCallback sets given callback on builder.
func (*Builder) SetPassword ¶
SetPassword sets given password on builder.
func (*Builder) SetPasswordVerifyCallback ¶
func (b *Builder) SetPasswordVerifyCallback(passwordVerifyCallback callback.PasswordVerify) *Builder
SetPasswordVerifyCallback sets given callback on builder.
func (*Builder) SetUsername ¶
SetUsername sets given username on builder.
type Impl ¶
type Impl struct {
// contains filtered or unexported fields
}
func New ¶
func New( logger logger.Logger, username string, password string, authMethodsCallback callback.AuthMethods, passwordVerifyCallback callback.PasswordVerify, ) (*Impl, error)
New returns new webhook instance.
func (*Impl) GetGinHandler ¶
func (i *Impl) GetGinHandler() (*ginhandler.GinHandler, error)
GetGinHandler returns Gin handler which can be used in Gin Web Framework.
func (*Impl) GetStandardHandler ¶
func (i *Impl) GetStandardHandler() (*standardhandler.StandardHandler, error)
GetStandardHandler returns standard handler which can be used in standard HTTP library.
type Webhook ¶
type Webhook interface { GetStandardHandler() (*standardhandler.StandardHandler, error) GetGinHandler() (*ginhandler.GinHandler, error) }
Click to show internal directories.
Click to hide internal directories.