Documentation
¶
Index ¶
- Constants
- func InitApp(opts ...kratosx.Option) *kratosx.App
- type Conf
- type Context
- func (c Context) Auth() *types2.AuthorizeInfo
- func (c Context) Clone() Context
- func (Context) Config() *Conf
- func (c Context) JWT() pkgtjwt.JWT
- func (c Context) Token() string
- func (c Context) Transaction(fn func(ctx Context) error, name ...string) error
- func (c Context) TryAuth() *types2.AuthorizeInfo
Constants ¶
View Source
const ( JwterKey = "jwter" TokenKey = "x-md-global-token" AppKey = kratosx.AppKeyMetadataKey )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Context ¶
func MustContext ¶
func MustContext(ctx context.Context, opts ...kratosx.ContextOptionFunc) Context
func (Context) Auth ¶
func (c Context) Auth() *types2.AuthorizeInfo
func (Context) Transaction ¶
func (Context) TryAuth ¶ added in v1.2.10
func (c Context) TryAuth() *types2.AuthorizeInfo
Click to show internal directories.
Click to hide internal directories.