Documentation ¶
Overview ¶
Package authz is a generated protocol buffer package.
It is generated from these files:
grant.proto
It has these top-level messages:
GrantList Grant
Index ¶
- Variables
- func EqualGrants(a, b Grant) bool
- func ValidX509SubjectField(s string) bool
- type Authorizer
- type Grant
- func (*Grant) Descriptor() ([]byte, []int)
- func (m *Grant) GetCreatedAt() string
- func (m *Grant) GetGuardData() []byte
- func (m *Grant) GetGuardType() string
- func (m *Grant) GetPolicy() string
- func (m *Grant) GetProtected() bool
- func (*Grant) ProtoMessage()
- func (m *Grant) Reset()
- func (m *Grant) String() string
- type GrantList
- type Loader
- type PKIXName
- type Store
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotAuthorized = errors.New("not authorized")
Functions ¶
func EqualGrants ¶
func ValidX509SubjectField ¶
Types ¶
type Authorizer ¶
type Authorizer struct {
// contains filtered or unexported fields
}
func NewAuthorizer ¶
func NewAuthorizer(l Loader, policyMap map[string][]string) *Authorizer
type Grant ¶
type Grant struct { GuardType string `protobuf:"bytes,1,opt,name=guard_type,json=guardType" json:"guard_type,omitempty"` GuardData []byte `protobuf:"bytes,2,opt,name=guard_data,json=guardData,proto3" json:"guard_data,omitempty"` Policy string `protobuf:"bytes,3,opt,name=policy" json:"policy,omitempty"` CreatedAt string `protobuf:"bytes,4,opt,name=created_at,json=createdAt" json:"created_at,omitempty"` Protected bool `protobuf:"varint,5,opt,name=protected" json:"protected,omitempty"` }
func (*Grant) Descriptor ¶
func (*Grant) GetCreatedAt ¶
func (*Grant) GetGuardData ¶
func (*Grant) GetGuardType ¶
func (*Grant) GetProtected ¶
func (*Grant) ProtoMessage ¶
func (*Grant) ProtoMessage()
type GrantList ¶
type GrantList struct {
Grants []*Grant `protobuf:"bytes,1,rep,name=grants" json:"grants,omitempty"`
}
func (*GrantList) Descriptor ¶
func (*GrantList) ProtoMessage ¶
func (*GrantList) ProtoMessage()
type PKIXName ¶
type PKIXName struct { Country []string `json:"C,omitempty"` Organization []string `json:"O,omitempty"` OrganizationalUnit []string `json:"OU,omitempty"` Locality []string `json:"L,omitempty"` Province []string `json:"ST,omitempty"` StreetAddress []string `json:"STREET,omitempty"` PostalCode []string `json:"POSTALCODE,omitempty"` SerialNumber string `json:"SERIALNUMBER,omitempty"` CommonName string `json:"CN,omitempty"` Names []pkix.AttributeTypeAndValue `json:"-"` ExtraNames []pkix.AttributeTypeAndValue `json:"-"` }
PKIXName represents a PKIX Distinguished Name. It is the same type as Name in package crypto/x509/pkix, but with JSON tags declaring the X.500 standard "short name" for each field.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store provides persistent storage for grant objects.
func NewStore ¶
NewStore returns a new *Store storing grants in db under keyPrefix. It implements the Loader interface.
func (*Store) Delete ¶
Delete returns an Op to delete from policy all stored grants for which delete returns true.
Click to show internal directories.
Click to hide internal directories.