go_micro_srv_auth_token

package
v0.0.0-...-288cdce Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterTokenHandler

func RegisterTokenHandler(s server.Server, hdlr TokenHandler, opts ...server.HandlerOption) error

Types

type ReqKey

type ReqKey struct {
	Key                  string   `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ReqKey) Descriptor

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

func (*ReqKey) GetKey

func (m *ReqKey) GetKey() string

func (*ReqKey) ProtoMessage

func (*ReqKey) ProtoMessage()

func (*ReqKey) Reset

func (m *ReqKey) Reset()

func (*ReqKey) String

func (m *ReqKey) String() string

func (*ReqKey) XXX_DiscardUnknown

func (m *ReqKey) XXX_DiscardUnknown()

func (*ReqKey) XXX_Marshal

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

func (*ReqKey) XXX_Merge

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

func (*ReqKey) XXX_Size

func (m *ReqKey) XXX_Size() int

func (*ReqKey) XXX_Unmarshal

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

type ReqToken

type ReqToken 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 (*ReqToken) Descriptor

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

func (*ReqToken) GetToken

func (m *ReqToken) GetToken() string

func (*ReqToken) ProtoMessage

func (*ReqToken) ProtoMessage()

func (*ReqToken) Reset

func (m *ReqToken) Reset()

func (*ReqToken) String

func (m *ReqToken) String() string

func (*ReqToken) XXX_DiscardUnknown

func (m *ReqToken) XXX_DiscardUnknown()

func (*ReqToken) XXX_Marshal

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

func (*ReqToken) XXX_Merge

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

func (*ReqToken) XXX_Size

func (m *ReqToken) XXX_Size() int

func (*ReqToken) XXX_Unmarshal

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

type Rsp

type Rsp struct {
	Token                string   `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	Verified             bool     `protobuf:"varint,2,opt,name=verified,proto3" json:"verified,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Rsp) Descriptor

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

func (*Rsp) GetToken

func (m *Rsp) GetToken() string

func (*Rsp) GetVerified

func (m *Rsp) GetVerified() bool

func (*Rsp) ProtoMessage

func (*Rsp) ProtoMessage()

func (*Rsp) Reset

func (m *Rsp) Reset()

func (*Rsp) String

func (m *Rsp) String() string

func (*Rsp) XXX_DiscardUnknown

func (m *Rsp) XXX_DiscardUnknown()

func (*Rsp) XXX_Marshal

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

func (*Rsp) XXX_Merge

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

func (*Rsp) XXX_Size

func (m *Rsp) XXX_Size() int

func (*Rsp) XXX_Unmarshal

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

type TokenHandler

type TokenHandler interface {
	Generate(context.Context, *ReqKey, *Rsp) error
	Verify(context.Context, *ReqToken, *Rsp) error
}

type TokenService

type TokenService interface {
	Generate(ctx context.Context, in *ReqKey, opts ...client.CallOption) (*Rsp, error)
	Verify(ctx context.Context, in *ReqToken, opts ...client.CallOption) (*Rsp, error)
}

func NewTokenService

func NewTokenService(name string, c client.Client) TokenService

Jump to

Keyboard shortcuts

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