go_micro_auth

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 10, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

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) Descriptor() ([]byte, []int)

func (*Account) GetCreated

func (m *Account) GetCreated() int64

func (*Account) GetExpiry

func (m *Account) GetExpiry() int64

func (*Account) GetId

func (m *Account) GetId() string

func (*Account) GetMetadata

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

func (*Account) GetRoles

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

func (*Account) GetToken

func (m *Account) GetToken() 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 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) Descriptor() ([]byte, []int)

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 {
	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) Descriptor() ([]byte, []int)

func (*Role) GetName

func (m *Role) GetName() string

func (*Role) GetResource

func (m *Role) GetResource() *Resource

func (*Role) ProtoMessage

func (*Role) ProtoMessage()

func (*Role) Reset

func (m *Role) Reset()

func (*Role) String

func (m *Role) String() string

func (*Role) XXX_DiscardUnknown

func (m *Role) XXX_DiscardUnknown()

func (*Role) XXX_Marshal

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

func (*Role) XXX_Merge

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

func (*Role) XXX_Size

func (m *Role) XXX_Size() int

func (*Role) XXX_Unmarshal

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

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

Jump to

Keyboard shortcuts

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