api

package
v0.0.0-...-3c3391d Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2017 License: MIT Imports: 12 Imported by: 0

README

Auth Server
--

Run `protoc -I ./auth/api/ ./auth/api/auth.proto --go_out=plugins=grpc:auth`

Documentation

Overview

Package api is a generated protocol buffer package.

It is generated from these files:

auth.proto

It has these top-level messages:

GetUserInfoRequest
GetUserInfoResponse

Package api is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterGipfeliAuthServiceHandler

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

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

func RegisterGipfeliAuthServiceHandlerFromEndpoint

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

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

func RegisterGipfeliAuthServiceServer

func RegisterGipfeliAuthServiceServer(s *grpc.Server, srv GipfeliAuthServiceServer)

Types

type GetUserInfoRequest

type GetUserInfoRequest struct {
	Authorization string `protobuf:"bytes,1,opt,name=authorization" json:"authorization,omitempty"`
}

func (*GetUserInfoRequest) Descriptor

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

func (*GetUserInfoRequest) GetAuthorization

func (m *GetUserInfoRequest) GetAuthorization() string

func (*GetUserInfoRequest) ProtoMessage

func (*GetUserInfoRequest) ProtoMessage()

func (*GetUserInfoRequest) Reset

func (m *GetUserInfoRequest) Reset()

func (*GetUserInfoRequest) String

func (m *GetUserInfoRequest) String() string

type GetUserInfoResponse

type GetUserInfoResponse struct {
	UserId   string `protobuf:"bytes,1,opt,name=user_id,json=userId" json:"user_id,omitempty"`
	UserName string `protobuf:"bytes,2,opt,name=user_name,json=userName" json:"user_name,omitempty"`
}

func (*GetUserInfoResponse) Descriptor

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

func (*GetUserInfoResponse) GetUserId

func (m *GetUserInfoResponse) GetUserId() string

func (*GetUserInfoResponse) GetUserName

func (m *GetUserInfoResponse) GetUserName() string

func (*GetUserInfoResponse) ProtoMessage

func (*GetUserInfoResponse) ProtoMessage()

func (*GetUserInfoResponse) Reset

func (m *GetUserInfoResponse) Reset()

func (*GetUserInfoResponse) String

func (m *GetUserInfoResponse) String() string

type GipfeliAuthServiceClient

type GipfeliAuthServiceClient interface {
	GetUserInfo(ctx context.Context, in *GetUserInfoRequest, opts ...grpc.CallOption) (*GetUserInfoResponse, error)
}

func NewGipfeliAuthServiceClient

func NewGipfeliAuthServiceClient(cc *grpc.ClientConn) GipfeliAuthServiceClient

type GipfeliAuthServiceServer

type GipfeliAuthServiceServer interface {
	GetUserInfo(context.Context, *GetUserInfoRequest) (*GetUserInfoResponse, error)
}

Jump to

Keyboard shortcuts

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