proposal

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlertError

type AlertError interface {
	error
	BzError() BzError
	AlertMessage() *AlertMessage
}

type AlertMessage

type AlertMessage struct {
	ProjectName  string            `json:"project_name,omitempty"`
	JournalID    string            `json:"journal_id,omitempty"`
	ErrorVerbose string            `json:"error_verbose,omitempty"`
	Meta         *AlertMessageMeta `json:"meta,omitempty"`
	Timestamp    time.Time         `json:"timestamp,omitempty"`
}

func (*AlertMessage) Marshal

func (a *AlertMessage) Marshal() []byte

func (*AlertMessage) Unmarshal

func (a *AlertMessage) Unmarshal(raw []byte) error

type AlertMessageMeta

type AlertMessageMeta struct {
	URL        string `json:"url,omitempty"`
	Parameters string `json:"parameters,omitempty"`
}

type BzError

type BzError interface {
	error
	Code
	StackErr() errors.Error
}

type Code

type Code interface {
	BzCode() uint16
	HTTPCode() uint16
	Desc() string
	WithDesc(string) Code
}

type NotifyHandler

type NotifyHandler func(msg *AlertMessage)

type Payload

type Payload interface {
	JournalID() string
	ForwardedByGrpcGateway() bool
	Service() string
	Date() string
	Method() string
	URI() string
	Body() string
}

Payload rest or grpc payload

type SignatureHandler

type SignatureHandler func(proxyAuthorization string, payload Payload) (identifier string, ok bool, err error)

type UserinfoHandler

type UserinfoHandler func(authorization string, payload Payload) (userinfo interface{}, err error)

type Validator

type Validator interface {
	Validate() error
}

type WhitelistingHandler

type WhitelistingHandler func(xForwardedFor string) (ok bool, err error)

Jump to

Keyboard shortcuts

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