auth

package
v0.0.0-...-2aa98dc Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package auth is a generated protocol buffer package.

It is generated from these files:

srv/auth/proto/auth.proto

It has these top-level messages:

LoginRequest
LoginResult
Request
Result

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 AuthHandler

type AuthHandler interface {
	Login(context.Context, *LoginRequest, *LoginResult) error
	VerifyToken(context.Context, *Request, *Result) error
}

type AuthService

type AuthService interface {
	Login(ctx context.Context, in *LoginRequest, opts ...client.CallOption) (*LoginResult, error)
	VerifyToken(ctx context.Context, in *Request, opts ...client.CallOption) (*Result, error)
}

func NewAuthService

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

type LoginRequest

type LoginRequest struct {
	User                 string   `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
	Pwd                  string   `protobuf:"bytes,2,opt,name=pwd,proto3" json:"pwd,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*LoginRequest) Descriptor

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

func (*LoginRequest) GetPwd

func (m *LoginRequest) GetPwd() string

func (*LoginRequest) GetUser

func (m *LoginRequest) GetUser() string

func (*LoginRequest) ProtoMessage

func (*LoginRequest) ProtoMessage()

func (*LoginRequest) Reset

func (m *LoginRequest) Reset()

func (*LoginRequest) String

func (m *LoginRequest) String() string

func (*LoginRequest) XXX_DiscardUnknown

func (m *LoginRequest) XXX_DiscardUnknown()

func (*LoginRequest) XXX_Marshal

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

func (*LoginRequest) XXX_Merge

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

func (*LoginRequest) XXX_Size

func (m *LoginRequest) XXX_Size() int

func (*LoginRequest) XXX_Unmarshal

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

type LoginResult

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

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

func (*LoginResult) GetToken

func (m *LoginResult) GetToken() string

func (*LoginResult) ProtoMessage

func (*LoginResult) ProtoMessage()

func (*LoginResult) Reset

func (m *LoginResult) Reset()

func (*LoginResult) String

func (m *LoginResult) String() string

func (*LoginResult) XXX_DiscardUnknown

func (m *LoginResult) XXX_DiscardUnknown()

func (*LoginResult) XXX_Marshal

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

func (*LoginResult) XXX_Merge

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

func (*LoginResult) XXX_Size

func (m *LoginResult) XXX_Size() int

func (*LoginResult) XXX_Unmarshal

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

type Request

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

func (*Request) Descriptor

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

func (*Request) GetAuthToken

func (m *Request) GetAuthToken() string

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) Reset

func (m *Request) Reset()

func (*Request) String

func (m *Request) String() string

func (*Request) XXX_DiscardUnknown

func (m *Request) XXX_DiscardUnknown()

func (*Request) XXX_Marshal

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

func (*Request) XXX_Merge

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

func (*Request) XXX_Size

func (m *Request) XXX_Size() int

func (*Request) XXX_Unmarshal

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

type Result

type Result struct {
	State                int64    `protobuf:"varint,1,opt,name=state,proto3" json:"state,omitempty"`
	Msg                  string   `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Result) Descriptor

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

func (*Result) GetMsg

func (m *Result) GetMsg() string

func (*Result) GetState

func (m *Result) GetState() int64

func (*Result) ProtoMessage

func (*Result) ProtoMessage()

func (*Result) Reset

func (m *Result) Reset()

func (*Result) String

func (m *Result) String() string

func (*Result) XXX_DiscardUnknown

func (m *Result) XXX_DiscardUnknown()

func (*Result) XXX_Marshal

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

func (*Result) XXX_Merge

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

func (*Result) XXX_Size

func (m *Result) XXX_Size() int

func (*Result) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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