incoming

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: May 24, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Request

type Request struct {
	Log utils.Logger
	// contains filtered or unexported fields
}

func NewRequest

func NewRequest(mm *pluginapi.Client, config config.Service, log utils.Logger, session SessionService, opts ...RequestOption) *Request

func (*Request) ActingUserID

func (r *Request) ActingUserID() string

func (*Request) AppID

func (r *Request) AppID() apps.AppID

func (*Request) Clone

func (r *Request) Clone(opts ...RequestOption) *Request

Clone creates a shallow copy of request, allowing clones to apply per-request changes.

func (*Request) Ctx

func (r *Request) Ctx() context.Context

func (*Request) GetMMClient

func (r *Request) GetMMClient() (mmclient.Client, error)

func (*Request) PluginID

func (r *Request) PluginID() string

func (*Request) SetActingUserID

func (r *Request) SetActingUserID(userID string)

func (*Request) SetAppID

func (r *Request) SetAppID(appID apps.AppID)

func (*Request) UpdateAppContext

func (r *Request) UpdateAppContext(cc apps.Context) apps.Context

func (*Request) UserAccessToken

func (r *Request) UserAccessToken() (string, error)

type RequestOption

type RequestOption func(*Request)

func WithAppContext

func WithAppContext(cc apps.Context) RequestOption

func WithAppID

func WithAppID(appID apps.AppID) RequestOption

func WithCtx

func WithCtx(ctx context.Context) RequestOption

func WithTimeout added in v1.1.0

func WithTimeout(timeout time.Duration, cancelFunc *context.CancelFunc) RequestOption

type SessionService

type SessionService interface {
	GetOrCreate(r *Request, appID apps.AppID, userID string) (*model.Session, error)
}

Jump to

Keyboard shortcuts

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