pb

package
Version: v0.0.0-...-7bce887 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2017 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Overview

Package pb is a generated protocol buffer package.

It is generated from these files:

auth.proto

It has these top-level messages:

LogInRequest
CredentialsRequest
AuthResponse

Package pb is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterAuthenticatorHandler

func RegisterAuthenticatorHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterAuthenticatorHandler registers the http handlers for service Authenticator to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterAuthenticatorHandlerFromEndpoint

func RegisterAuthenticatorHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterAuthenticatorHandlerFromEndpoint is same as RegisterAuthenticatorHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterAuthenticatorServer

func RegisterAuthenticatorServer(s *grpc.Server, srv AuthenticatorServer)

Types

type AuthResponse

type AuthResponse struct {
	Token      string `protobuf:"bytes,1,opt,name=token" json:"token,omitempty"`
	ValidUntil string `protobuf:"bytes,2,opt,name=validUntil" json:"validUntil,omitempty"`
}

The response message containing the greetings

func (*AuthResponse) Descriptor

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

func (*AuthResponse) GetToken

func (m *AuthResponse) GetToken() string

func (*AuthResponse) GetValidUntil

func (m *AuthResponse) GetValidUntil() string

func (*AuthResponse) ProtoMessage

func (*AuthResponse) ProtoMessage()

func (*AuthResponse) Reset

func (m *AuthResponse) Reset()

func (*AuthResponse) String

func (m *AuthResponse) String() string

type AuthenticatorClient

type AuthenticatorClient interface {
	// Sends a greeting
	LogIn(ctx context.Context, in *LogInRequest, opts ...grpc.CallOption) (*AuthResponse, error)
	Validate(ctx context.Context, in *CredentialsRequest, opts ...grpc.CallOption) (*AuthResponse, error)
}

func NewAuthenticatorClient

func NewAuthenticatorClient(cc *grpc.ClientConn) AuthenticatorClient

type AuthenticatorServer

type AuthenticatorServer interface {
	// Sends a greeting
	LogIn(context.Context, *LogInRequest) (*AuthResponse, error)
	Validate(context.Context, *CredentialsRequest) (*AuthResponse, error)
}

type CredentialsRequest

type CredentialsRequest struct {
	Token string `protobuf:"bytes,1,opt,name=token" json:"token,omitempty"`
}

func (*CredentialsRequest) Descriptor

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

func (*CredentialsRequest) GetToken

func (m *CredentialsRequest) GetToken() string

func (*CredentialsRequest) ProtoMessage

func (*CredentialsRequest) ProtoMessage()

func (*CredentialsRequest) Reset

func (m *CredentialsRequest) Reset()

func (*CredentialsRequest) String

func (m *CredentialsRequest) String() string

type LogInRequest

type LogInRequest struct {
	Username string `protobuf:"bytes,1,opt,name=username" json:"username,omitempty"`
	Password string `protobuf:"bytes,2,opt,name=password" json:"password,omitempty"`
}

The request message containing the user's name.

func (*LogInRequest) Descriptor

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

func (*LogInRequest) GetPassword

func (m *LogInRequest) GetPassword() string

func (*LogInRequest) GetUsername

func (m *LogInRequest) GetUsername() string

func (*LogInRequest) ProtoMessage

func (*LogInRequest) ProtoMessage()

func (*LogInRequest) Reset

func (m *LogInRequest) Reset()

func (*LogInRequest) String

func (m *LogInRequest) 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