context

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2019 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultTenantId     = "tenantId"
	DefaultUserId       = "userId"
	NoAuthAdminTenantId = "adminTenantId"
)
View Source
const (
	KContext = "context"
)

Variables

This section is empty.

Functions

func FilterFactory

func FilterFactory() restful.FilterFunction

Types

type Context

type Context struct {
	TenantId string `json:"tenantId"`
	IsAdmin  bool   `json:"isAdmin"`
	UserId   string `json:"userId"`
}

func NewAdminContext

func NewAdminContext() *Context

func NewContext

func NewContext() *Context

func NewContextFromJson

func NewContextFromJson(s string) *Context

func (*Context) ToJson

func (ctx *Context) ToJson() string

Jump to

Keyboard shortcuts

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