auth

package
v0.0.0-...-b63aa1a Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterService

func RegisterService(s giraffe_micro.Server, srv Service)

Types

type Client

type Client interface {
	GetCaptcha(ctx context.Context, in *types.Empty) (*types.Empty, error)
	UserAuth(ctx context.Context, in *UserAuthRequest) (*UserAuthResponse, error)
}

Client is the client API for auth service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewClient

func NewClient(c giraffe_micro.Client) Client

type GetCaptchaResponseWrapper

type GetCaptchaResponseWrapper struct {
	//
	//返回码
	Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code" form:"code"`
	//
	//返回码解释
	CodeExplain string `protobuf:"bytes,2,opt,name=codeExplain,proto3" json:"codeExplain" form:"codeExplain"`
	//
	//错误详情
	Error string `protobuf:"bytes,3,opt,name=error,proto3" json:"error" form:"error"`
	//
	//返回数据
	Data                 *types.Empty `protobuf:"bytes,4,opt,name=data,proto3" json:"data" form:"data"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

GetCaptchaApi返回

func (*GetCaptchaResponseWrapper) Descriptor

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

func (*GetCaptchaResponseWrapper) GetCode

func (m *GetCaptchaResponseWrapper) GetCode() int32

func (*GetCaptchaResponseWrapper) GetCodeExplain

func (m *GetCaptchaResponseWrapper) GetCodeExplain() string

func (*GetCaptchaResponseWrapper) GetData

func (m *GetCaptchaResponseWrapper) GetData() *types.Empty

func (*GetCaptchaResponseWrapper) GetError

func (m *GetCaptchaResponseWrapper) GetError() string

func (*GetCaptchaResponseWrapper) ProtoMessage

func (*GetCaptchaResponseWrapper) ProtoMessage()

func (*GetCaptchaResponseWrapper) Reset

func (m *GetCaptchaResponseWrapper) Reset()

func (*GetCaptchaResponseWrapper) String

func (m *GetCaptchaResponseWrapper) String() string

func (*GetCaptchaResponseWrapper) Validate

func (this *GetCaptchaResponseWrapper) Validate() error

func (*GetCaptchaResponseWrapper) XXX_DiscardUnknown

func (m *GetCaptchaResponseWrapper) XXX_DiscardUnknown()

func (*GetCaptchaResponseWrapper) XXX_Marshal

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

func (*GetCaptchaResponseWrapper) XXX_Merge

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

func (*GetCaptchaResponseWrapper) XXX_Size

func (m *GetCaptchaResponseWrapper) XXX_Size() int

func (*GetCaptchaResponseWrapper) XXX_Unmarshal

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

type Service

type Service interface {
	GetCaptcha(context.Context, *types.Empty) (*types.Empty, error)
	UserAuth(context.Context, *UserAuthRequest) (*UserAuthResponse, error)
}

Service is the server API for auth service.

type UserAuthRequest

type UserAuthRequest struct {
	//
	//用户名
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name" form:"name"`
	//
	//密码
	Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password" form:"password"`
	//
	//验证码
	Phrase               string   `protobuf:"bytes,3,opt,name=phrase,proto3" json:"phrase" form:"phrase"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

UserAuth请求

func (*UserAuthRequest) Descriptor

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

func (*UserAuthRequest) GetName

func (m *UserAuthRequest) GetName() string

func (*UserAuthRequest) GetPassword

func (m *UserAuthRequest) GetPassword() string

func (*UserAuthRequest) GetPhrase

func (m *UserAuthRequest) GetPhrase() string

func (*UserAuthRequest) ProtoMessage

func (*UserAuthRequest) ProtoMessage()

func (*UserAuthRequest) Reset

func (m *UserAuthRequest) Reset()

func (*UserAuthRequest) String

func (m *UserAuthRequest) String() string

func (*UserAuthRequest) Validate

func (this *UserAuthRequest) Validate() error

func (*UserAuthRequest) XXX_DiscardUnknown

func (m *UserAuthRequest) XXX_DiscardUnknown()

func (*UserAuthRequest) XXX_Marshal

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

func (*UserAuthRequest) XXX_Merge

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

func (*UserAuthRequest) XXX_Size

func (m *UserAuthRequest) XXX_Size() int

func (*UserAuthRequest) XXX_Unmarshal

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

type UserAuthResponse

type UserAuthResponse struct {
	//
	//用户名
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name" form:"name"`
	//
	//org
	Org                  int32    `protobuf:"varint,2,opt,name=org,proto3" json:"org" form:"org"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

UserAuth返回

func (*UserAuthResponse) Descriptor

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

func (*UserAuthResponse) GetName

func (m *UserAuthResponse) GetName() string

func (*UserAuthResponse) GetOrg

func (m *UserAuthResponse) GetOrg() int32

func (*UserAuthResponse) ProtoMessage

func (*UserAuthResponse) ProtoMessage()

func (*UserAuthResponse) Reset

func (m *UserAuthResponse) Reset()

func (*UserAuthResponse) String

func (m *UserAuthResponse) String() string

func (*UserAuthResponse) Validate

func (this *UserAuthResponse) Validate() error

func (*UserAuthResponse) XXX_DiscardUnknown

func (m *UserAuthResponse) XXX_DiscardUnknown()

func (*UserAuthResponse) XXX_Marshal

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

func (*UserAuthResponse) XXX_Merge

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

func (*UserAuthResponse) XXX_Size

func (m *UserAuthResponse) XXX_Size() int

func (*UserAuthResponse) XXX_Unmarshal

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

type UserAuthResponseWrapper

type UserAuthResponseWrapper struct {
	//
	//返回码
	Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code" form:"code"`
	//
	//返回码解释
	CodeExplain string `protobuf:"bytes,2,opt,name=codeExplain,proto3" json:"codeExplain" form:"codeExplain"`
	//
	//错误详情
	Error string `protobuf:"bytes,3,opt,name=error,proto3" json:"error" form:"error"`
	//
	//返回数据
	Data                 *UserAuthResponse `protobuf:"bytes,4,opt,name=data,proto3" json:"data" form:"data"`
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

UserAuthApi返回

func (*UserAuthResponseWrapper) Descriptor

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

func (*UserAuthResponseWrapper) GetCode

func (m *UserAuthResponseWrapper) GetCode() int32

func (*UserAuthResponseWrapper) GetCodeExplain

func (m *UserAuthResponseWrapper) GetCodeExplain() string

func (*UserAuthResponseWrapper) GetData

func (*UserAuthResponseWrapper) GetError

func (m *UserAuthResponseWrapper) GetError() string

func (*UserAuthResponseWrapper) ProtoMessage

func (*UserAuthResponseWrapper) ProtoMessage()

func (*UserAuthResponseWrapper) Reset

func (m *UserAuthResponseWrapper) Reset()

func (*UserAuthResponseWrapper) String

func (m *UserAuthResponseWrapper) String() string

func (*UserAuthResponseWrapper) Validate

func (this *UserAuthResponseWrapper) Validate() error

func (*UserAuthResponseWrapper) XXX_DiscardUnknown

func (m *UserAuthResponseWrapper) XXX_DiscardUnknown()

func (*UserAuthResponseWrapper) XXX_Marshal

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

func (*UserAuthResponseWrapper) XXX_Merge

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

func (*UserAuthResponseWrapper) XXX_Size

func (m *UserAuthResponseWrapper) XXX_Size() int

func (*UserAuthResponseWrapper) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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