Documentation ¶
Index ¶
- func RegisterAuthHandler(s server.Server, hdlr AuthHandler, opts ...server.HandlerOption) error
- type Account
- func (*Account) Descriptor() ([]byte, []int)
- func (m *Account) GetCreated() int64
- func (m *Account) GetExpiry() int64
- func (m *Account) GetId() string
- func (m *Account) GetMetadata() map[string]string
- func (m *Account) GetRoles() []*Role
- func (m *Account) GetToken() string
- func (*Account) ProtoMessage()
- func (m *Account) Reset()
- func (m *Account) String() string
- func (m *Account) XXX_DiscardUnknown()
- func (m *Account) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Account) XXX_Merge(src proto.Message)
- func (m *Account) XXX_Size() int
- func (m *Account) XXX_Unmarshal(b []byte) error
- type AuthHandler
- type AuthService
- type GenerateRequest
- func (*GenerateRequest) Descriptor() ([]byte, []int)
- func (m *GenerateRequest) GetAccount() *Account
- func (*GenerateRequest) ProtoMessage()
- func (m *GenerateRequest) Reset()
- func (m *GenerateRequest) String() string
- func (m *GenerateRequest) XXX_DiscardUnknown()
- func (m *GenerateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GenerateRequest) XXX_Merge(src proto.Message)
- func (m *GenerateRequest) XXX_Size() int
- func (m *GenerateRequest) XXX_Unmarshal(b []byte) error
- type GenerateResponse
- func (*GenerateResponse) Descriptor() ([]byte, []int)
- func (m *GenerateResponse) GetAccount() *Account
- func (*GenerateResponse) ProtoMessage()
- func (m *GenerateResponse) Reset()
- func (m *GenerateResponse) String() string
- func (m *GenerateResponse) XXX_DiscardUnknown()
- func (m *GenerateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GenerateResponse) XXX_Merge(src proto.Message)
- func (m *GenerateResponse) XXX_Size() int
- func (m *GenerateResponse) XXX_Unmarshal(b []byte) error
- type Resource
- func (*Resource) Descriptor() ([]byte, []int)
- func (m *Resource) GetName() string
- func (m *Resource) GetType() string
- func (*Resource) ProtoMessage()
- func (m *Resource) Reset()
- func (m *Resource) String() string
- func (m *Resource) XXX_DiscardUnknown()
- func (m *Resource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Resource) XXX_Merge(src proto.Message)
- func (m *Resource) XXX_Size() int
- func (m *Resource) XXX_Unmarshal(b []byte) error
- type RevokeRequest
- func (*RevokeRequest) Descriptor() ([]byte, []int)
- func (m *RevokeRequest) GetToken() string
- func (*RevokeRequest) ProtoMessage()
- func (m *RevokeRequest) Reset()
- func (m *RevokeRequest) String() string
- func (m *RevokeRequest) XXX_DiscardUnknown()
- func (m *RevokeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RevokeRequest) XXX_Merge(src proto.Message)
- func (m *RevokeRequest) XXX_Size() int
- func (m *RevokeRequest) XXX_Unmarshal(b []byte) error
- type RevokeResponse
- func (*RevokeResponse) Descriptor() ([]byte, []int)
- func (*RevokeResponse) ProtoMessage()
- func (m *RevokeResponse) Reset()
- func (m *RevokeResponse) String() string
- func (m *RevokeResponse) XXX_DiscardUnknown()
- func (m *RevokeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RevokeResponse) XXX_Merge(src proto.Message)
- func (m *RevokeResponse) XXX_Size() int
- func (m *RevokeResponse) XXX_Unmarshal(b []byte) error
- type Role
- func (*Role) Descriptor() ([]byte, []int)
- func (m *Role) GetName() string
- func (m *Role) GetResource() *Resource
- func (*Role) ProtoMessage()
- func (m *Role) Reset()
- func (m *Role) String() string
- func (m *Role) XXX_DiscardUnknown()
- func (m *Role) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Role) XXX_Merge(src proto.Message)
- func (m *Role) XXX_Size() int
- func (m *Role) XXX_Unmarshal(b []byte) error
- type VerifyRequest
- func (*VerifyRequest) Descriptor() ([]byte, []int)
- func (m *VerifyRequest) GetToken() string
- func (*VerifyRequest) ProtoMessage()
- func (m *VerifyRequest) Reset()
- func (m *VerifyRequest) String() string
- func (m *VerifyRequest) XXX_DiscardUnknown()
- func (m *VerifyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *VerifyRequest) XXX_Merge(src proto.Message)
- func (m *VerifyRequest) XXX_Size() int
- func (m *VerifyRequest) XXX_Unmarshal(b []byte) error
- type VerifyResponse
- func (*VerifyResponse) Descriptor() ([]byte, []int)
- func (m *VerifyResponse) GetAccount() *Account
- func (*VerifyResponse) ProtoMessage()
- func (m *VerifyResponse) Reset()
- func (m *VerifyResponse) String() string
- func (m *VerifyResponse) XXX_DiscardUnknown()
- func (m *VerifyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *VerifyResponse) XXX_Merge(src proto.Message)
- func (m *VerifyResponse) XXX_Size() int
- func (m *VerifyResponse) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterAuthHandler ¶
func RegisterAuthHandler(s server.Server, hdlr AuthHandler, opts ...server.HandlerOption) error
Types ¶
type Account ¶
type Account struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` Created int64 `protobuf:"varint,3,opt,name=created,proto3" json:"created,omitempty"` Expiry int64 `protobuf:"varint,4,opt,name=expiry,proto3" json:"expiry,omitempty"` Roles []*Role `protobuf:"bytes,5,rep,name=roles,proto3" json:"roles,omitempty"` Metadata map[string]string `` /* 157-byte string literal not displayed */ XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Account) Descriptor ¶
func (*Account) GetCreated ¶
func (*Account) GetMetadata ¶
func (*Account) ProtoMessage ¶
func (*Account) ProtoMessage()
func (*Account) XXX_DiscardUnknown ¶
func (m *Account) XXX_DiscardUnknown()
func (*Account) XXX_Marshal ¶
func (*Account) XXX_Unmarshal ¶
type AuthHandler ¶
type AuthHandler interface { Generate(context.Context, *GenerateRequest, *GenerateResponse) error Verify(context.Context, *VerifyRequest, *VerifyResponse) error Revoke(context.Context, *RevokeRequest, *RevokeResponse) error }
type AuthService ¶
type AuthService interface { Generate(ctx context.Context, in *GenerateRequest, opts ...client.CallOption) (*GenerateResponse, error) Verify(ctx context.Context, in *VerifyRequest, opts ...client.CallOption) (*VerifyResponse, error) Revoke(ctx context.Context, in *RevokeRequest, opts ...client.CallOption) (*RevokeResponse, error) }
func NewAuthService ¶
func NewAuthService(name string, c client.Client) AuthService
type GenerateRequest ¶
type GenerateRequest struct { Account *Account `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*GenerateRequest) Descriptor ¶
func (*GenerateRequest) Descriptor() ([]byte, []int)
func (*GenerateRequest) GetAccount ¶
func (m *GenerateRequest) GetAccount() *Account
func (*GenerateRequest) ProtoMessage ¶
func (*GenerateRequest) ProtoMessage()
func (*GenerateRequest) Reset ¶
func (m *GenerateRequest) Reset()
func (*GenerateRequest) String ¶
func (m *GenerateRequest) String() string
func (*GenerateRequest) XXX_DiscardUnknown ¶
func (m *GenerateRequest) XXX_DiscardUnknown()
func (*GenerateRequest) XXX_Marshal ¶
func (m *GenerateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GenerateRequest) XXX_Merge ¶
func (m *GenerateRequest) XXX_Merge(src proto.Message)
func (*GenerateRequest) XXX_Size ¶
func (m *GenerateRequest) XXX_Size() int
func (*GenerateRequest) XXX_Unmarshal ¶
func (m *GenerateRequest) XXX_Unmarshal(b []byte) error
type GenerateResponse ¶
type GenerateResponse struct { Account *Account `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*GenerateResponse) Descriptor ¶
func (*GenerateResponse) Descriptor() ([]byte, []int)
func (*GenerateResponse) GetAccount ¶
func (m *GenerateResponse) GetAccount() *Account
func (*GenerateResponse) ProtoMessage ¶
func (*GenerateResponse) ProtoMessage()
func (*GenerateResponse) Reset ¶
func (m *GenerateResponse) Reset()
func (*GenerateResponse) String ¶
func (m *GenerateResponse) String() string
func (*GenerateResponse) XXX_DiscardUnknown ¶
func (m *GenerateResponse) XXX_DiscardUnknown()
func (*GenerateResponse) XXX_Marshal ¶
func (m *GenerateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GenerateResponse) XXX_Merge ¶
func (m *GenerateResponse) XXX_Merge(src proto.Message)
func (*GenerateResponse) XXX_Size ¶
func (m *GenerateResponse) XXX_Size() int
func (*GenerateResponse) XXX_Unmarshal ¶
func (m *GenerateResponse) XXX_Unmarshal(b []byte) error
type Resource ¶
type Resource struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Resource) Descriptor ¶
func (*Resource) ProtoMessage ¶
func (*Resource) ProtoMessage()
func (*Resource) XXX_DiscardUnknown ¶
func (m *Resource) XXX_DiscardUnknown()
func (*Resource) XXX_Marshal ¶
func (*Resource) XXX_Unmarshal ¶
type RevokeRequest ¶
type RevokeRequest struct { Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*RevokeRequest) Descriptor ¶
func (*RevokeRequest) Descriptor() ([]byte, []int)
func (*RevokeRequest) GetToken ¶
func (m *RevokeRequest) GetToken() string
func (*RevokeRequest) ProtoMessage ¶
func (*RevokeRequest) ProtoMessage()
func (*RevokeRequest) Reset ¶
func (m *RevokeRequest) Reset()
func (*RevokeRequest) String ¶
func (m *RevokeRequest) String() string
func (*RevokeRequest) XXX_DiscardUnknown ¶
func (m *RevokeRequest) XXX_DiscardUnknown()
func (*RevokeRequest) XXX_Marshal ¶
func (m *RevokeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*RevokeRequest) XXX_Merge ¶
func (m *RevokeRequest) XXX_Merge(src proto.Message)
func (*RevokeRequest) XXX_Size ¶
func (m *RevokeRequest) XXX_Size() int
func (*RevokeRequest) XXX_Unmarshal ¶
func (m *RevokeRequest) XXX_Unmarshal(b []byte) error
type RevokeResponse ¶
type RevokeResponse struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*RevokeResponse) Descriptor ¶
func (*RevokeResponse) Descriptor() ([]byte, []int)
func (*RevokeResponse) ProtoMessage ¶
func (*RevokeResponse) ProtoMessage()
func (*RevokeResponse) Reset ¶
func (m *RevokeResponse) Reset()
func (*RevokeResponse) String ¶
func (m *RevokeResponse) String() string
func (*RevokeResponse) XXX_DiscardUnknown ¶
func (m *RevokeResponse) XXX_DiscardUnknown()
func (*RevokeResponse) XXX_Marshal ¶
func (m *RevokeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*RevokeResponse) XXX_Merge ¶
func (m *RevokeResponse) XXX_Merge(src proto.Message)
func (*RevokeResponse) XXX_Size ¶
func (m *RevokeResponse) XXX_Size() int
func (*RevokeResponse) XXX_Unmarshal ¶
func (m *RevokeResponse) XXX_Unmarshal(b []byte) error
type Role ¶
type Role struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Resource *Resource `protobuf:"bytes,2,opt,name=resource,proto3" json:"resource,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Role) Descriptor ¶
func (*Role) GetResource ¶
func (*Role) ProtoMessage ¶
func (*Role) ProtoMessage()
func (*Role) XXX_DiscardUnknown ¶
func (m *Role) XXX_DiscardUnknown()
func (*Role) XXX_Unmarshal ¶
type VerifyRequest ¶
type VerifyRequest struct { Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*VerifyRequest) Descriptor ¶
func (*VerifyRequest) Descriptor() ([]byte, []int)
func (*VerifyRequest) GetToken ¶
func (m *VerifyRequest) GetToken() string
func (*VerifyRequest) ProtoMessage ¶
func (*VerifyRequest) ProtoMessage()
func (*VerifyRequest) Reset ¶
func (m *VerifyRequest) Reset()
func (*VerifyRequest) String ¶
func (m *VerifyRequest) String() string
func (*VerifyRequest) XXX_DiscardUnknown ¶
func (m *VerifyRequest) XXX_DiscardUnknown()
func (*VerifyRequest) XXX_Marshal ¶
func (m *VerifyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*VerifyRequest) XXX_Merge ¶
func (m *VerifyRequest) XXX_Merge(src proto.Message)
func (*VerifyRequest) XXX_Size ¶
func (m *VerifyRequest) XXX_Size() int
func (*VerifyRequest) XXX_Unmarshal ¶
func (m *VerifyRequest) XXX_Unmarshal(b []byte) error
type VerifyResponse ¶
type VerifyResponse struct { Account *Account `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*VerifyResponse) Descriptor ¶
func (*VerifyResponse) Descriptor() ([]byte, []int)
func (*VerifyResponse) GetAccount ¶
func (m *VerifyResponse) GetAccount() *Account
func (*VerifyResponse) ProtoMessage ¶
func (*VerifyResponse) ProtoMessage()
func (*VerifyResponse) Reset ¶
func (m *VerifyResponse) Reset()
func (*VerifyResponse) String ¶
func (m *VerifyResponse) String() string
func (*VerifyResponse) XXX_DiscardUnknown ¶
func (m *VerifyResponse) XXX_DiscardUnknown()
func (*VerifyResponse) XXX_Marshal ¶
func (m *VerifyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*VerifyResponse) XXX_Merge ¶
func (m *VerifyResponse) XXX_Merge(src proto.Message)
func (*VerifyResponse) XXX_Size ¶
func (m *VerifyResponse) XXX_Size() int
func (*VerifyResponse) XXX_Unmarshal ¶
func (m *VerifyResponse) XXX_Unmarshal(b []byte) error
Click to show internal directories.
Click to hide internal directories.