Documentation
¶
Overview ¶
Package api declares Datly 1.0 components that are the authz SDK endpoints.
Index ¶
- Constants
- Variables
- func NewCheck() xhandler.Contract[CheckInput, DecisionOutput]
- func NewCreate() xhandler.Contract[WriteInput, PolicyOutput]
- func NewGet() xhandler.Contract[PolicyInput, PolicyOutput]
- func NewReplace() xhandler.Contract[WriteInput, PolicyOutput]
- func Registrations(ctx context.Context, baseDir string, services *Services, codecs xcodec.Factory) ([]*registry.RegisteredComponent, error)
- type CheckInput
- type Components
- type DecisionOutput
- type PolicyInput
- type PolicyOutput
- type Services
- type WriteInput
Constants ¶
View Source
const Capability = xhandler.ValueKey("authz.sdk")
View Source
const Package = "github.com/viant/authz/datly/api"
Variables ¶
View Source
var Datly = new(Components)
Functions ¶
func NewCheck ¶
func NewCheck() xhandler.Contract[CheckInput, DecisionOutput]
func NewCreate ¶
func NewCreate() xhandler.Contract[WriteInput, PolicyOutput]
func NewGet ¶
func NewGet() xhandler.Contract[PolicyInput, PolicyOutput]
func NewReplace ¶
func NewReplace() xhandler.Contract[WriteInput, PolicyOutput]
func Registrations ¶
func Registrations(ctx context.Context, baseDir string, services *Services, codecs xcodec.Factory) ([]*registry.RegisteredComponent, error)
Registrations discovers the declared SDK components using native Datly bootstrap. The host supplies its verifier and narrow authz capabilities. Other projects can use these same components in their own runtime.
Types ¶
type CheckInput ¶
type CheckInput struct {
JWT *jwt.Claims `parameter:"JWT,kind=header,in=Authorization,dataType=string,required=true,errorCode=401" codec:"JwtClaim" json:"-"`
Resource authz.Resource `parameter:"Resource,kind=body,in=resource,required=true" json:"resource"`
Action string `parameter:"Action,kind=body,in=action,required=true" json:"action"`
Selection *[]authz.Entity `parameter:"Selection,kind=body,in=selection" json:"selection,omitempty"`
}
type Components ¶
type Components struct {
Check xdatly.Component[CheckInput, DecisionOutput] `` /* 156-byte string literal not displayed */
Get xdatly.Component[PolicyInput, PolicyOutput] `` /* 145-byte string literal not displayed */
Create xdatly.Component[WriteInput, PolicyOutput] `` /* 157-byte string literal not displayed */
Replace xdatly.Component[WriteInput, PolicyOutput] `` /* 161-byte string literal not displayed */
}
func (Components) DatlyHandler ¶
func (Components) DatlyHandler(name string) func() (rhandler.TypedHandler, error)
type DecisionOutput ¶
type PolicyInput ¶
type PolicyOutput ¶
Click to show internal directories.
Click to hide internal directories.