Documentation
¶
Index ¶
- func OptionPolicy() gatewayOption
- type NullPolicy
- type PermPolicy
- type Policy
- type RouterPolicy
- type Rule
- type UserPolicy
- type YockdGateWay
- func (gate *YockdGateWay) AddRule(str []byte) error
- func (gate *YockdGateWay) DelRule(str []byte) error
- func (gate *YockdGateWay) GuardStream() grpc.ServerOption
- func (gate *YockdGateWay) GuardTransport(c, k string, cas ...string) grpc.ServerOption
- func (gate *YockdGateWay) GuardUnary() grpc.ServerOption
- func (gate *YockdGateWay) SetAgent(name string, agent agent.RuleAgent)
- func (gate *YockdGateWay) SetPolicy(p PermPolicy)
- func (gate *YockdGateWay) SetRule(key string, rules ...string)
- func (gate *YockdGateWay) UnsetRule(key string, rules ...string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OptionPolicy ¶
func OptionPolicy() gatewayOption
Types ¶
type NullPolicy ¶
type NullPolicy struct{}
func (NullPolicy) AppendRule ¶
func (NullPolicy) AppendRule(string, ...rule.Rule)
func (NullPolicy) Policy ¶
func (null NullPolicy) Policy() Policy
func (NullPolicy) String ¶
func (NullPolicy) String() string
type PermPolicy ¶
type RouterPolicy ¶
type RouterPolicy struct {
// contains filtered or unexported fields
}
func NewRouterPolicy ¶
func NewRouterPolicy() *RouterPolicy
func (*RouterPolicy) AppendRule ¶
func (p *RouterPolicy) AppendRule(key string, tokens ...rule.Rule)
func (*RouterPolicy) Policy ¶
func (*RouterPolicy) Policy() Policy
func (*RouterPolicy) String ¶
func (p *RouterPolicy) String() string
type UserPolicy ¶
type UserPolicy struct {
// contains filtered or unexported fields
}
func NewUserPolicy ¶
func NewUserPolicy() *UserPolicy
func (*UserPolicy) AppendRule ¶
func (p *UserPolicy) AppendRule(key string, tokens ...rule.Rule)
func (*UserPolicy) Policy ¶
func (*UserPolicy) Policy() Policy
func (*UserPolicy) String ¶
func (p *UserPolicy) String() string
type YockdGateWay ¶
type YockdGateWay struct {
// contains filtered or unexported fields
}
func New ¶
func New() *YockdGateWay
func (*YockdGateWay) AddRule ¶
func (gate *YockdGateWay) AddRule(str []byte) error
func (*YockdGateWay) DelRule ¶
func (gate *YockdGateWay) DelRule(str []byte) error
func (*YockdGateWay) GuardStream ¶
func (gate *YockdGateWay) GuardStream() grpc.ServerOption
func (*YockdGateWay) GuardTransport ¶
func (gate *YockdGateWay) GuardTransport(c, k string, cas ...string) grpc.ServerOption
func (*YockdGateWay) GuardUnary ¶
func (gate *YockdGateWay) GuardUnary() grpc.ServerOption
func (*YockdGateWay) SetAgent ¶
func (gate *YockdGateWay) SetAgent(name string, agent agent.RuleAgent)
func (*YockdGateWay) SetPolicy ¶
func (gate *YockdGateWay) SetPolicy(p PermPolicy)
func (*YockdGateWay) SetRule ¶
func (gate *YockdGateWay) SetRule(key string, rules ...string)
func (*YockdGateWay) UnsetRule ¶
func (gate *YockdGateWay) UnsetRule(key string, rules ...string)
Click to show internal directories.
Click to hide internal directories.