go_micro_auth

package
v2.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 31, 2020 License: Apache-2.0 Imports: 6 Imported by: 11

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Access_name = map[int32]string{
	0: "UNKNOWN",
	1: "GRANTED",
	2: "DENIED",
}
View Source
var Access_value = map[string]int32{
	"UNKNOWN": 0,
	"GRANTED": 1,
	"DENIED":  2,
}

Functions

func RegisterAccountsHandler added in v2.4.0

func RegisterAccountsHandler(s server.Server, hdlr AccountsHandler, opts ...server.HandlerOption) error

func RegisterAuthHandler

func RegisterAuthHandler(s server.Server, hdlr AuthHandler, opts ...server.HandlerOption) error

func RegisterRulesHandler added in v2.4.0

func RegisterRulesHandler(s server.Server, hdlr RulesHandler, opts ...server.HandlerOption) error

Types

type Access added in v2.4.0

type Access int32
const (
	Access_UNKNOWN Access = 0
	Access_GRANTED Access = 1
	Access_DENIED  Access = 2
)

func (Access) EnumDescriptor added in v2.4.0

func (Access) EnumDescriptor() ([]byte, []int)

func (Access) String added in v2.4.0

func (x Access) String() string

type Account

type Account struct {
	Id                   string            `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Secret               string            `protobuf:"bytes,2,opt,name=secret,proto3" json:"secret,omitempty"`
	Roles                []string          `protobuf:"bytes,3,rep,name=roles,proto3" json:"roles,omitempty"`
	Metadata             map[string]string `` /* 157-byte string literal not displayed */
	Namespace            string            `protobuf:"bytes,5,opt,name=namespace,proto3" json:"namespace,omitempty"`
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

func (*Account) Descriptor

func (*Account) Descriptor() ([]byte, []int)

func (*Account) GetId

func (m *Account) GetId() string

func (*Account) GetMetadata

func (m *Account) GetMetadata() map[string]string

func (*Account) GetNamespace added in v2.4.0

func (m *Account) GetNamespace() string

func (*Account) GetRoles

func (m *Account) GetRoles() []string

func (*Account) GetSecret added in v2.4.0

func (m *Account) GetSecret() string

func (*Account) ProtoMessage

func (*Account) ProtoMessage()

func (*Account) Reset

func (m *Account) Reset()

func (*Account) String

func (m *Account) String() string

func (*Account) XXX_DiscardUnknown

func (m *Account) XXX_DiscardUnknown()

func (*Account) XXX_Marshal

func (m *Account) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Account) XXX_Merge

func (m *Account) XXX_Merge(src proto.Message)

func (*Account) XXX_Size

func (m *Account) XXX_Size() int

func (*Account) XXX_Unmarshal

func (m *Account) XXX_Unmarshal(b []byte) error

type AccountsHandler added in v2.4.0

type AccountsHandler interface {
	List(context.Context, *ListAccountsRequest, *ListAccountsResponse) error
}

type AccountsService added in v2.4.0

type AccountsService interface {
	List(ctx context.Context, in *ListAccountsRequest, opts ...client.CallOption) (*ListAccountsResponse, error)
}

func NewAccountsService added in v2.4.0

func NewAccountsService(name string, c client.Client) AccountsService

type AuthService

type AuthService interface {
	Generate(ctx context.Context, in *GenerateRequest, opts ...client.CallOption) (*GenerateResponse, error)
	Inspect(ctx context.Context, in *InspectRequest, opts ...client.CallOption) (*InspectResponse, error)
	Token(ctx context.Context, in *TokenRequest, opts ...client.CallOption) (*TokenResponse, error)
}

func NewAuthService

func NewAuthService(name string, c client.Client) AuthService

type CreateRequest added in v2.4.0

type CreateRequest struct {
	Role                 string    `protobuf:"bytes,1,opt,name=role,proto3" json:"role,omitempty"`
	Resource             *Resource `protobuf:"bytes,2,opt,name=resource,proto3" json:"resource,omitempty"`
	Access               Access    `protobuf:"varint,3,opt,name=access,proto3,enum=go.micro.auth.Access" json:"access,omitempty"`
	XXX_NoUnkeyedLiteral struct{}  `json:"-"`
	XXX_unrecognized     []byte    `json:"-"`
	XXX_sizecache        int32     `json:"-"`
}

func (*CreateRequest) Descriptor added in v2.4.0

func (*CreateRequest) Descriptor() ([]byte, []int)

func (*CreateRequest) GetAccess added in v2.4.0

func (m *CreateRequest) GetAccess() Access

func (*CreateRequest) GetResource added in v2.4.0

func (m *CreateRequest) GetResource() *Resource

func (*CreateRequest) GetRole added in v2.4.0

func (m *CreateRequest) GetRole() string

func (*CreateRequest) ProtoMessage added in v2.4.0

func (*CreateRequest) ProtoMessage()

func (*CreateRequest) Reset added in v2.4.0

func (m *CreateRequest) Reset()

func (*CreateRequest) String added in v2.4.0

func (m *CreateRequest) String() string

func (*CreateRequest) XXX_DiscardUnknown added in v2.4.0

func (m *CreateRequest) XXX_DiscardUnknown()

func (*CreateRequest) XXX_Marshal added in v2.4.0

func (m *CreateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CreateRequest) XXX_Merge added in v2.4.0

func (m *CreateRequest) XXX_Merge(src proto.Message)

func (*CreateRequest) XXX_Size added in v2.4.0

func (m *CreateRequest) XXX_Size() int

func (*CreateRequest) XXX_Unmarshal added in v2.4.0

func (m *CreateRequest) XXX_Unmarshal(b []byte) error

type CreateResponse added in v2.4.0

type CreateResponse struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*CreateResponse) Descriptor added in v2.4.0

func (*CreateResponse) Descriptor() ([]byte, []int)

func (*CreateResponse) ProtoMessage added in v2.4.0

func (*CreateResponse) ProtoMessage()

func (*CreateResponse) Reset added in v2.4.0

func (m *CreateResponse) Reset()

func (*CreateResponse) String added in v2.4.0

func (m *CreateResponse) String() string

func (*CreateResponse) XXX_DiscardUnknown added in v2.4.0

func (m *CreateResponse) XXX_DiscardUnknown()

func (*CreateResponse) XXX_Marshal added in v2.4.0

func (m *CreateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CreateResponse) XXX_Merge added in v2.4.0

func (m *CreateResponse) XXX_Merge(src proto.Message)

func (*CreateResponse) XXX_Size added in v2.4.0

func (m *CreateResponse) XXX_Size() int

func (*CreateResponse) XXX_Unmarshal added in v2.4.0

func (m *CreateResponse) XXX_Unmarshal(b []byte) error

type DeleteRequest added in v2.4.0

type DeleteRequest struct {
	Role                 string    `protobuf:"bytes,1,opt,name=role,proto3" json:"role,omitempty"`
	Resource             *Resource `protobuf:"bytes,2,opt,name=resource,proto3" json:"resource,omitempty"`
	Access               Access    `protobuf:"varint,3,opt,name=access,proto3,enum=go.micro.auth.Access" json:"access,omitempty"`
	XXX_NoUnkeyedLiteral struct{}  `json:"-"`
	XXX_unrecognized     []byte    `json:"-"`
	XXX_sizecache        int32     `json:"-"`
}

func (*DeleteRequest) Descriptor added in v2.4.0

func (*DeleteRequest) Descriptor() ([]byte, []int)

func (*DeleteRequest) GetAccess added in v2.4.0

func (m *DeleteRequest) GetAccess() Access

func (*DeleteRequest) GetResource added in v2.4.0

func (m *DeleteRequest) GetResource() *Resource

func (*DeleteRequest) GetRole added in v2.4.0

func (m *DeleteRequest) GetRole() string

func (*DeleteRequest) ProtoMessage added in v2.4.0

func (*DeleteRequest) ProtoMessage()

func (*DeleteRequest) Reset added in v2.4.0

func (m *DeleteRequest) Reset()

func (*DeleteRequest) String added in v2.4.0

func (m *DeleteRequest) String() string

func (*DeleteRequest) XXX_DiscardUnknown added in v2.4.0

func (m *DeleteRequest) XXX_DiscardUnknown()

func (*DeleteRequest) XXX_Marshal added in v2.4.0

func (m *DeleteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DeleteRequest) XXX_Merge added in v2.4.0

func (m *DeleteRequest) XXX_Merge(src proto.Message)

func (*DeleteRequest) XXX_Size added in v2.4.0

func (m *DeleteRequest) XXX_Size() int

func (*DeleteRequest) XXX_Unmarshal added in v2.4.0

func (m *DeleteRequest) XXX_Unmarshal(b []byte) error

type DeleteResponse added in v2.4.0

type DeleteResponse struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*DeleteResponse) Descriptor added in v2.4.0

func (*DeleteResponse) Descriptor() ([]byte, []int)

func (*DeleteResponse) ProtoMessage added in v2.4.0

func (*DeleteResponse) ProtoMessage()

func (*DeleteResponse) Reset added in v2.4.0

func (m *DeleteResponse) Reset()

func (*DeleteResponse) String added in v2.4.0

func (m *DeleteResponse) String() string

func (*DeleteResponse) XXX_DiscardUnknown added in v2.4.0

func (m *DeleteResponse) XXX_DiscardUnknown()

func (*DeleteResponse) XXX_Marshal added in v2.4.0

func (m *DeleteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DeleteResponse) XXX_Merge added in v2.4.0

func (m *DeleteResponse) XXX_Merge(src proto.Message)

func (*DeleteResponse) XXX_Size added in v2.4.0

func (m *DeleteResponse) XXX_Size() int

func (*DeleteResponse) XXX_Unmarshal added in v2.4.0

func (m *DeleteResponse) XXX_Unmarshal(b []byte) error

type GenerateRequest

type GenerateRequest struct {
	Id                   string            `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Roles                []string          `protobuf:"bytes,2,rep,name=roles,proto3" json:"roles,omitempty"`
	Metadata             map[string]string `` /* 157-byte string literal not displayed */
	Namespace            string            `protobuf:"bytes,4,opt,name=namespace,proto3" json:"namespace,omitempty"`
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

func (*GenerateRequest) Descriptor

func (*GenerateRequest) Descriptor() ([]byte, []int)

func (*GenerateRequest) GetId added in v2.4.0

func (m *GenerateRequest) GetId() string

func (*GenerateRequest) GetMetadata added in v2.4.0

func (m *GenerateRequest) GetMetadata() map[string]string

func (*GenerateRequest) GetNamespace added in v2.4.0

func (m *GenerateRequest) GetNamespace() string

func (*GenerateRequest) GetRoles added in v2.4.0

func (m *GenerateRequest) GetRoles() []string

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 GrantRequest added in v2.4.0

type GrantRequest struct {
	Role                 string    `protobuf:"bytes,1,opt,name=role,proto3" json:"role,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 (*GrantRequest) Descriptor added in v2.4.0

func (*GrantRequest) Descriptor() ([]byte, []int)

func (*GrantRequest) GetResource added in v2.4.0

func (m *GrantRequest) GetResource() *Resource

func (*GrantRequest) GetRole added in v2.4.0

func (m *GrantRequest) GetRole() string

func (*GrantRequest) ProtoMessage added in v2.4.0

func (*GrantRequest) ProtoMessage()

func (*GrantRequest) Reset added in v2.4.0

func (m *GrantRequest) Reset()

func (*GrantRequest) String added in v2.4.0

func (m *GrantRequest) String() string

func (*GrantRequest) XXX_DiscardUnknown added in v2.4.0

func (m *GrantRequest) XXX_DiscardUnknown()

func (*GrantRequest) XXX_Marshal added in v2.4.0

func (m *GrantRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GrantRequest) XXX_Merge added in v2.4.0

func (m *GrantRequest) XXX_Merge(src proto.Message)

func (*GrantRequest) XXX_Size added in v2.4.0

func (m *GrantRequest) XXX_Size() int

func (*GrantRequest) XXX_Unmarshal added in v2.4.0

func (m *GrantRequest) XXX_Unmarshal(b []byte) error

type GrantResponse added in v2.4.0

type GrantResponse struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*GrantResponse) Descriptor added in v2.4.0

func (*GrantResponse) Descriptor() ([]byte, []int)

func (*GrantResponse) ProtoMessage added in v2.4.0

func (*GrantResponse) ProtoMessage()

func (*GrantResponse) Reset added in v2.4.0

func (m *GrantResponse) Reset()

func (*GrantResponse) String added in v2.4.0

func (m *GrantResponse) String() string

func (*GrantResponse) XXX_DiscardUnknown added in v2.4.0

func (m *GrantResponse) XXX_DiscardUnknown()

func (*GrantResponse) XXX_Marshal added in v2.4.0

func (m *GrantResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GrantResponse) XXX_Merge added in v2.4.0

func (m *GrantResponse) XXX_Merge(src proto.Message)

func (*GrantResponse) XXX_Size added in v2.4.0

func (m *GrantResponse) XXX_Size() int

func (*GrantResponse) XXX_Unmarshal added in v2.4.0

func (m *GrantResponse) XXX_Unmarshal(b []byte) error

type InspectRequest added in v2.4.0

type InspectRequest 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 (*InspectRequest) Descriptor added in v2.4.0

func (*InspectRequest) Descriptor() ([]byte, []int)

func (*InspectRequest) GetToken added in v2.4.0

func (m *InspectRequest) GetToken() string

func (*InspectRequest) ProtoMessage added in v2.4.0

func (*InspectRequest) ProtoMessage()

func (*InspectRequest) Reset added in v2.4.0

func (m *InspectRequest) Reset()

func (*InspectRequest) String added in v2.4.0

func (m *InspectRequest) String() string

func (*InspectRequest) XXX_DiscardUnknown added in v2.4.0

func (m *InspectRequest) XXX_DiscardUnknown()

func (*InspectRequest) XXX_Marshal added in v2.4.0

func (m *InspectRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*InspectRequest) XXX_Merge added in v2.4.0

func (m *InspectRequest) XXX_Merge(src proto.Message)

func (*InspectRequest) XXX_Size added in v2.4.0

func (m *InspectRequest) XXX_Size() int

func (*InspectRequest) XXX_Unmarshal added in v2.4.0

func (m *InspectRequest) XXX_Unmarshal(b []byte) error

type InspectResponse added in v2.4.0

type InspectResponse 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 (*InspectResponse) Descriptor added in v2.4.0

func (*InspectResponse) Descriptor() ([]byte, []int)

func (*InspectResponse) GetAccount added in v2.4.0

func (m *InspectResponse) GetAccount() *Account

func (*InspectResponse) ProtoMessage added in v2.4.0

func (*InspectResponse) ProtoMessage()

func (*InspectResponse) Reset added in v2.4.0

func (m *InspectResponse) Reset()

func (*InspectResponse) String added in v2.4.0

func (m *InspectResponse) String() string

func (*InspectResponse) XXX_DiscardUnknown added in v2.4.0

func (m *InspectResponse) XXX_DiscardUnknown()

func (*InspectResponse) XXX_Marshal added in v2.4.0

func (m *InspectResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*InspectResponse) XXX_Merge added in v2.4.0

func (m *InspectResponse) XXX_Merge(src proto.Message)

func (*InspectResponse) XXX_Size added in v2.4.0

func (m *InspectResponse) XXX_Size() int

func (*InspectResponse) XXX_Unmarshal added in v2.4.0

func (m *InspectResponse) XXX_Unmarshal(b []byte) error

type ListAccountsRequest added in v2.4.0

type ListAccountsRequest struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ListAccountsRequest) Descriptor added in v2.4.0

func (*ListAccountsRequest) Descriptor() ([]byte, []int)

func (*ListAccountsRequest) ProtoMessage added in v2.4.0

func (*ListAccountsRequest) ProtoMessage()

func (*ListAccountsRequest) Reset added in v2.4.0

func (m *ListAccountsRequest) Reset()

func (*ListAccountsRequest) String added in v2.4.0

func (m *ListAccountsRequest) String() string

func (*ListAccountsRequest) XXX_DiscardUnknown added in v2.4.0

func (m *ListAccountsRequest) XXX_DiscardUnknown()

func (*ListAccountsRequest) XXX_Marshal added in v2.4.0

func (m *ListAccountsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ListAccountsRequest) XXX_Merge added in v2.4.0

func (m *ListAccountsRequest) XXX_Merge(src proto.Message)

func (*ListAccountsRequest) XXX_Size added in v2.4.0

func (m *ListAccountsRequest) XXX_Size() int

func (*ListAccountsRequest) XXX_Unmarshal added in v2.4.0

func (m *ListAccountsRequest) XXX_Unmarshal(b []byte) error

type ListAccountsResponse added in v2.4.0

type ListAccountsResponse struct {
	Accounts             []*Account `protobuf:"bytes,1,rep,name=accounts,proto3" json:"accounts,omitempty"`
	XXX_NoUnkeyedLiteral struct{}   `json:"-"`
	XXX_unrecognized     []byte     `json:"-"`
	XXX_sizecache        int32      `json:"-"`
}

func (*ListAccountsResponse) Descriptor added in v2.4.0

func (*ListAccountsResponse) Descriptor() ([]byte, []int)

func (*ListAccountsResponse) GetAccounts added in v2.4.0

func (m *ListAccountsResponse) GetAccounts() []*Account

func (*ListAccountsResponse) ProtoMessage added in v2.4.0

func (*ListAccountsResponse) ProtoMessage()

func (*ListAccountsResponse) Reset added in v2.4.0

func (m *ListAccountsResponse) Reset()

func (*ListAccountsResponse) String added in v2.4.0

func (m *ListAccountsResponse) String() string

func (*ListAccountsResponse) XXX_DiscardUnknown added in v2.4.0

func (m *ListAccountsResponse) XXX_DiscardUnknown()

func (*ListAccountsResponse) XXX_Marshal added in v2.4.0

func (m *ListAccountsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ListAccountsResponse) XXX_Merge added in v2.4.0

func (m *ListAccountsResponse) XXX_Merge(src proto.Message)

func (*ListAccountsResponse) XXX_Size added in v2.4.0

func (m *ListAccountsResponse) XXX_Size() int

func (*ListAccountsResponse) XXX_Unmarshal added in v2.4.0

func (m *ListAccountsResponse) XXX_Unmarshal(b []byte) error

type ListRequest added in v2.4.0

type ListRequest struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ListRequest) Descriptor added in v2.4.0

func (*ListRequest) Descriptor() ([]byte, []int)

func (*ListRequest) ProtoMessage added in v2.4.0

func (*ListRequest) ProtoMessage()

func (*ListRequest) Reset added in v2.4.0

func (m *ListRequest) Reset()

func (*ListRequest) String added in v2.4.0

func (m *ListRequest) String() string

func (*ListRequest) XXX_DiscardUnknown added in v2.4.0

func (m *ListRequest) XXX_DiscardUnknown()

func (*ListRequest) XXX_Marshal added in v2.4.0

func (m *ListRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ListRequest) XXX_Merge added in v2.4.0

func (m *ListRequest) XXX_Merge(src proto.Message)

func (*ListRequest) XXX_Size added in v2.4.0

func (m *ListRequest) XXX_Size() int

func (*ListRequest) XXX_Unmarshal added in v2.4.0

func (m *ListRequest) XXX_Unmarshal(b []byte) error

type ListResponse added in v2.4.0

type ListResponse struct {
	Rules                []*Rule  `protobuf:"bytes,1,rep,name=rules,proto3" json:"rules,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ListResponse) Descriptor added in v2.4.0

func (*ListResponse) Descriptor() ([]byte, []int)

func (*ListResponse) GetRules added in v2.4.0

func (m *ListResponse) GetRules() []*Rule

func (*ListResponse) ProtoMessage added in v2.4.0

func (*ListResponse) ProtoMessage()

func (*ListResponse) Reset added in v2.4.0

func (m *ListResponse) Reset()

func (*ListResponse) String added in v2.4.0

func (m *ListResponse) String() string

func (*ListResponse) XXX_DiscardUnknown added in v2.4.0

func (m *ListResponse) XXX_DiscardUnknown()

func (*ListResponse) XXX_Marshal added in v2.4.0

func (m *ListResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ListResponse) XXX_Merge added in v2.4.0

func (m *ListResponse) XXX_Merge(src proto.Message)

func (*ListResponse) XXX_Size added in v2.4.0

func (m *ListResponse) XXX_Size() int

func (*ListResponse) XXX_Unmarshal added in v2.4.0

func (m *ListResponse) 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"`
	Endpoint             string   `protobuf:"bytes,3,opt,name=endpoint,proto3" json:"endpoint,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Resource) Descriptor

func (*Resource) Descriptor() ([]byte, []int)

func (*Resource) GetEndpoint added in v2.4.0

func (m *Resource) GetEndpoint() string

func (*Resource) GetName

func (m *Resource) GetName() string

func (*Resource) GetType

func (m *Resource) GetType() string

func (*Resource) ProtoMessage

func (*Resource) ProtoMessage()

func (*Resource) Reset

func (m *Resource) Reset()

func (*Resource) String

func (m *Resource) String() string

func (*Resource) XXX_DiscardUnknown

func (m *Resource) XXX_DiscardUnknown()

func (*Resource) XXX_Marshal

func (m *Resource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Resource) XXX_Merge

func (m *Resource) XXX_Merge(src proto.Message)

func (*Resource) XXX_Size

func (m *Resource) XXX_Size() int

func (*Resource) XXX_Unmarshal

func (m *Resource) XXX_Unmarshal(b []byte) error

type RevokeRequest

type RevokeRequest struct {
	Role                 string    `protobuf:"bytes,1,opt,name=role,proto3" json:"role,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 (*RevokeRequest) Descriptor

func (*RevokeRequest) Descriptor() ([]byte, []int)

func (*RevokeRequest) GetResource added in v2.4.0

func (m *RevokeRequest) GetResource() *Resource

func (*RevokeRequest) GetRole added in v2.4.0

func (m *RevokeRequest) GetRole() 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 Rule added in v2.4.0

type Rule struct {
	Id                   string    `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Role                 string    `protobuf:"bytes,2,opt,name=role,proto3" json:"role,omitempty"`
	Resource             *Resource `protobuf:"bytes,3,opt,name=resource,proto3" json:"resource,omitempty"`
	Access               Access    `protobuf:"varint,4,opt,name=access,proto3,enum=go.micro.auth.Access" json:"access,omitempty"`
	XXX_NoUnkeyedLiteral struct{}  `json:"-"`
	XXX_unrecognized     []byte    `json:"-"`
	XXX_sizecache        int32     `json:"-"`
}

func (*Rule) Descriptor added in v2.4.0

func (*Rule) Descriptor() ([]byte, []int)

func (*Rule) GetAccess added in v2.4.0

func (m *Rule) GetAccess() Access

func (*Rule) GetId added in v2.4.0

func (m *Rule) GetId() string

func (*Rule) GetResource added in v2.4.0

func (m *Rule) GetResource() *Resource

func (*Rule) GetRole added in v2.4.0

func (m *Rule) GetRole() string

func (*Rule) ProtoMessage added in v2.4.0

func (*Rule) ProtoMessage()

func (*Rule) Reset added in v2.4.0

func (m *Rule) Reset()

func (*Rule) String added in v2.4.0

func (m *Rule) String() string

func (*Rule) XXX_DiscardUnknown added in v2.4.0

func (m *Rule) XXX_DiscardUnknown()

func (*Rule) XXX_Marshal added in v2.4.0

func (m *Rule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Rule) XXX_Merge added in v2.4.0

func (m *Rule) XXX_Merge(src proto.Message)

func (*Rule) XXX_Size added in v2.4.0

func (m *Rule) XXX_Size() int

func (*Rule) XXX_Unmarshal added in v2.4.0

func (m *Rule) XXX_Unmarshal(b []byte) error

type RulesHandler added in v2.4.0

type RulesService added in v2.4.0

type RulesService interface {
	Create(ctx context.Context, in *CreateRequest, opts ...client.CallOption) (*CreateResponse, error)
	Delete(ctx context.Context, in *DeleteRequest, opts ...client.CallOption) (*DeleteResponse, error)
	List(ctx context.Context, in *ListRequest, opts ...client.CallOption) (*ListResponse, error)
}

func NewRulesService added in v2.4.0

func NewRulesService(name string, c client.Client) RulesService

type Token added in v2.4.0

type Token struct {
	Token                string            `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	Type                 string            `protobuf:"bytes,2,opt,name=type,proto3" json:"type,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"`
	Subject              string            `protobuf:"bytes,5,opt,name=subject,proto3" json:"subject,omitempty"`
	Roles                []string          `protobuf:"bytes,6,rep,name=roles,proto3" json:"roles,omitempty"`
	Metadata             map[string]string `` /* 157-byte string literal not displayed */
	Namespace            string            `protobuf:"bytes,8,opt,name=namespace,proto3" json:"namespace,omitempty"`
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

func (*Token) Descriptor added in v2.4.0

func (*Token) Descriptor() ([]byte, []int)

func (*Token) GetCreated added in v2.4.0

func (m *Token) GetCreated() int64

func (*Token) GetExpiry added in v2.4.0

func (m *Token) GetExpiry() int64

func (*Token) GetMetadata added in v2.4.0

func (m *Token) GetMetadata() map[string]string

func (*Token) GetNamespace added in v2.4.0

func (m *Token) GetNamespace() string

func (*Token) GetRoles added in v2.4.0

func (m *Token) GetRoles() []string

func (*Token) GetSubject added in v2.4.0

func (m *Token) GetSubject() string

func (*Token) GetToken added in v2.4.0

func (m *Token) GetToken() string

func (*Token) GetType added in v2.4.0

func (m *Token) GetType() string

func (*Token) ProtoMessage added in v2.4.0

func (*Token) ProtoMessage()

func (*Token) Reset added in v2.4.0

func (m *Token) Reset()

func (*Token) String added in v2.4.0

func (m *Token) String() string

func (*Token) XXX_DiscardUnknown added in v2.4.0

func (m *Token) XXX_DiscardUnknown()

func (*Token) XXX_Marshal added in v2.4.0

func (m *Token) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Token) XXX_Merge added in v2.4.0

func (m *Token) XXX_Merge(src proto.Message)

func (*Token) XXX_Size added in v2.4.0

func (m *Token) XXX_Size() int

func (*Token) XXX_Unmarshal added in v2.4.0

func (m *Token) XXX_Unmarshal(b []byte) error

type TokenRequest added in v2.4.0

type TokenRequest struct {
	Id                   string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Secret               string   `protobuf:"bytes,2,opt,name=secret,proto3" json:"secret,omitempty"`
	TokenExpiry          int64    `protobuf:"varint,3,opt,name=token_expiry,json=tokenExpiry,proto3" json:"token_expiry,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*TokenRequest) Descriptor added in v2.4.0

func (*TokenRequest) Descriptor() ([]byte, []int)

func (*TokenRequest) GetId added in v2.4.0

func (m *TokenRequest) GetId() string

func (*TokenRequest) GetSecret added in v2.4.0

func (m *TokenRequest) GetSecret() string

func (*TokenRequest) GetTokenExpiry added in v2.4.0

func (m *TokenRequest) GetTokenExpiry() int64

func (*TokenRequest) ProtoMessage added in v2.4.0

func (*TokenRequest) ProtoMessage()

func (*TokenRequest) Reset added in v2.4.0

func (m *TokenRequest) Reset()

func (*TokenRequest) String added in v2.4.0

func (m *TokenRequest) String() string

func (*TokenRequest) XXX_DiscardUnknown added in v2.4.0

func (m *TokenRequest) XXX_DiscardUnknown()

func (*TokenRequest) XXX_Marshal added in v2.4.0

func (m *TokenRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TokenRequest) XXX_Merge added in v2.4.0

func (m *TokenRequest) XXX_Merge(src proto.Message)

func (*TokenRequest) XXX_Size added in v2.4.0

func (m *TokenRequest) XXX_Size() int

func (*TokenRequest) XXX_Unmarshal added in v2.4.0

func (m *TokenRequest) XXX_Unmarshal(b []byte) error

type TokenResponse added in v2.4.0

type TokenResponse struct {
	Token                *Token   `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*TokenResponse) Descriptor added in v2.4.0

func (*TokenResponse) Descriptor() ([]byte, []int)

func (*TokenResponse) GetToken added in v2.4.0

func (m *TokenResponse) GetToken() *Token

func (*TokenResponse) ProtoMessage added in v2.4.0

func (*TokenResponse) ProtoMessage()

func (*TokenResponse) Reset added in v2.4.0

func (m *TokenResponse) Reset()

func (*TokenResponse) String added in v2.4.0

func (m *TokenResponse) String() string

func (*TokenResponse) XXX_DiscardUnknown added in v2.4.0

func (m *TokenResponse) XXX_DiscardUnknown()

func (*TokenResponse) XXX_Marshal added in v2.4.0

func (m *TokenResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TokenResponse) XXX_Merge added in v2.4.0

func (m *TokenResponse) XXX_Merge(src proto.Message)

func (*TokenResponse) XXX_Size added in v2.4.0

func (m *TokenResponse) XXX_Size() int

func (*TokenResponse) XXX_Unmarshal added in v2.4.0

func (m *TokenResponse) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL