Documentation ¶
Index ¶
- Constants
- Variables
- func NewVisitor(name string, visitor plugins.Valuer) plugins.BasicCodec
- type AsInts
- type AsStrings
- type CSV
- type CsvFactory
- type GCPJwtClaim
- type JWTClaims
- type StructQLCodec
- type StructQLFactory
- func (s StructQLFactory) Name() string
- func (s StructQLFactory) New(codec *plugins.CodecConfig, paramType reflect.Type) (plugins.Valuer, error)
- func (s StructQLFactory) Value(ctx context.Context, raw interface{}, options ...interface{}) (interface{}, error)
- func (s StructQLFactory) Valuer() plugins.Valuer
- type Visitor
Constants ¶
View Source
const ( TypeJwtTokenInfo = "JwtTokenInfo" TypeJwtClaims = "JwtClaims" CodecCognitoKeyJwtClaim = "CognitoJwtClaim" CodecKeyJwtClaim = "JwtClaim" CodecKeyAsStrings = "AsStrings" CodecKeyAsInts = "AsInts" CodecKeyCSV = "CSV" )
View Source
const CodecStructql = "structql"
Variables ¶
View Source
var Config = &plugins.Registry{ Types: map[string]reflect.Type{ TypeJwtTokenInfo: reflect.TypeOf(&JWTClaims{}), TypeJwtClaims: reflect.TypeOf(JWTClaims{}), }, Codecs: plugins.NewCodecs( plugins.NewCodec(CodecKeyJwtClaim, &GCPJwtClaim{}, reflect.TypeOf(&JWTClaims{})), plugins.NewCodec(CodecCognitoKeyJwtClaim, &GCPJwtClaim{}, reflect.TypeOf(&JWTClaims{})), plugins.NewCodec(CodecKeyAsInts, &AsInts{}, reflect.TypeOf([]int{})), plugins.NewCodec(CodecKeyAsStrings, &AsStrings{}, reflect.TypeOf([]string{})), CsvFactory(""), StructQLFactory(""), ), }
Functions ¶
func NewVisitor ¶
func NewVisitor(name string, visitor plugins.Valuer) plugins.BasicCodec
Types ¶
type CsvFactory ¶
type CsvFactory string
func (CsvFactory) Name ¶
func (c CsvFactory) Name() string
func (CsvFactory) New ¶
func (c CsvFactory) New(codec *plugins.CodecConfig, paramType reflect.Type) (plugins.Valuer, error)
func (CsvFactory) Value ¶
func (c CsvFactory) Value(ctx context.Context, raw interface{}, options ...interface{}) (interface{}, error)
func (CsvFactory) Valuer ¶
func (c CsvFactory) Valuer() plugins.Valuer
type JWTClaims ¶
type JWTClaims struct { Email string `json:"email,omitempty"` UserID int `json:"user_id,omitempty"` Username string `json:"username,omitempty"` FirstName string `json:"first_name,omitempty"` LastName string `json:"last_name,omitempty"` AccountName string `json:"account_name,omitempty"` AccountId int `json:"account_id,omitempty"` Scope string `json:"scope,omitempty"` Cognito string `json:"cognito,omitempty"` VerifiedEmail bool `json:"verified_email,omitempty"` Data interface{} `json:"dat,omitempty"` jwt.RegisteredClaims }
GCPJwtClaim represents IDJWT visitor
type StructQLCodec ¶
type StructQLCodec struct {
// contains filtered or unexported fields
}
func NewStructQLCodec ¶
func NewStructQLCodec(query string, paramType reflect.Type) (*StructQLCodec, error)
func (*StructQLCodec) Name ¶
func (s *StructQLCodec) Name() string
func (*StructQLCodec) ResultType ¶
func (*StructQLCodec) Value ¶
func (s *StructQLCodec) Value(ctx context.Context, raw interface{}, options ...interface{}) (interface{}, error)
func (*StructQLCodec) Valuer ¶
func (s *StructQLCodec) Valuer() plugins.Valuer
type StructQLFactory ¶
type StructQLFactory string
func (StructQLFactory) Name ¶
func (s StructQLFactory) Name() string
func (StructQLFactory) New ¶
func (s StructQLFactory) New(codec *plugins.CodecConfig, paramType reflect.Type) (plugins.Valuer, error)
func (StructQLFactory) Value ¶
func (s StructQLFactory) Value(ctx context.Context, raw interface{}, options ...interface{}) (interface{}, error)
func (StructQLFactory) Valuer ¶
func (s StructQLFactory) Valuer() plugins.Valuer
Click to show internal directories.
Click to hide internal directories.