auth

package
Version: v0.0.0-...-2897420 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2018 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package auth is a generated protocol buffer package.

It is generated from these files:

github.com/jinbanglin/examples/booking/srv/auth/proto/auth.proto

It has these top-level messages:

Request
Result
Customer

Package auth is a generated protocol buffer package.

It is generated from these files:

github.com/jinbanglin/examples/booking/srv/auth/proto/auth.proto

It has these top-level messages:

Request
Result
Customer

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterAuthHandler

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

func RegisterAuthServer

func RegisterAuthServer(s *grpc.Server, srv AuthServer)

Types

type AuthClient

type AuthClient interface {
	VerifyToken(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Result, error)
}

func NewAuthClient

func NewAuthClient(cc *grpc.ClientConn) AuthClient

type AuthHandler

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

type AuthServer

type AuthServer interface {
	VerifyToken(context.Context, *Request) (*Result, error)
}

type AuthService

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

func NewAuthService

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

type Customer

type Customer struct {
	Id        int32  `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
	AuthToken string `protobuf:"bytes,2,opt,name=authToken" json:"authToken,omitempty"`
}

func (*Customer) Descriptor

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

func (*Customer) GetAuthToken

func (m *Customer) GetAuthToken() string

func (*Customer) GetId

func (m *Customer) GetId() int32

func (*Customer) ProtoMessage

func (*Customer) ProtoMessage()

func (*Customer) Reset

func (m *Customer) Reset()

func (*Customer) String

func (m *Customer) String() string

type Request

type Request struct {
	AuthToken string `protobuf:"bytes,1,opt,name=authToken" json:"authToken,omitempty"`
}

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

type Result

type Result struct {
	Customer *Customer `protobuf:"bytes,1,opt,name=customer" json:"customer,omitempty"`
}

func (*Result) Descriptor

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

func (*Result) GetCustomer

func (m *Result) GetCustomer() *Customer

func (*Result) ProtoMessage

func (*Result) ProtoMessage()

func (*Result) Reset

func (m *Result) Reset()

func (*Result) String

func (m *Result) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL