Documentation
¶
Index ¶
- func CaptureException(err error)
- func WrapAction(action ActionFN) gin.HandlerFunc
- type ActionFN
- type Context
- func (c *Context) Ctx() context.Context
- func (c *Context) GetCookieToken() (string, error)
- func (c *Context) GetSession() (domain.Session, bool)
- func (c *Context) GetStore() storage.IStore
- func (c *Context) HandleError(err error)
- func (c *Context) IsOtpValid(passcode string, secret string) bool
- func (c *Context) JwtOpts() jwt.Opts
- func (c *Context) MustBindProto(m proto.Message) error
- func (c *Context) MustGetOpts() Opts
- func (c *Context) MustGetSession() domain.Session
- func (c *Context) MustGetUser() domain.User
- func (c *Context) MustGetVer() *pack.Ver
- func (c *Context) NewUserPolicy(user domain.User) policy.IUserPolicy
- func (c *Context) NewWorkspacePolicy(user domain.User, uw domain.UserWorkspace) policy.IWorkspacePolicy
- func (c *Context) OtpIssue(user domain.User) (secret string, url string, err error)
- func (c *Context) SetCookieToken(token string)
- func (c *Context) SetOpts(opts Opts) *Context
- func (c *Context) SetSession(session domain.Session)
- func (c *Context) SetStore(store storage.IStore) *Context
- type Engine
- type Opts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CaptureException ¶
func CaptureException(err error)
func WrapAction ¶
func WrapAction(action ActionFN) gin.HandlerFunc
Types ¶
type Context ¶
func (*Context) GetCookieToken ¶
func (*Context) HandleError ¶
func (*Context) MustGetOpts ¶
func (*Context) MustGetSession ¶
func (*Context) MustGetUser ¶
MustGetUser returns session user
func (*Context) MustGetVer ¶
func (*Context) NewUserPolicy ¶
func (c *Context) NewUserPolicy(user domain.User) policy.IUserPolicy
func (*Context) NewWorkspacePolicy ¶
func (c *Context) NewWorkspacePolicy(user domain.User, uw domain.UserWorkspace) policy.IWorkspacePolicy
func (*Context) SetCookieToken ¶
func (*Context) SetSession ¶
type Opts ¶
type Opts struct { AllowOrigin []string JwtKey []byte CookieDomain string CookieSecure bool Production bool BackupUrl string OtpStub string SentryDsn string Ver *pack.Ver UserPolicy policy.IUserPolicy WorkspacePolicy policy.IWorkspacePolicy }
func (*Opts) SetDefaultPolicies ¶
func (o *Opts) SetDefaultPolicies()
Click to show internal directories.
Click to hide internal directories.