schema

package
v0.0.0-...-1a8e668 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2017 License: MIT Imports: 12 Imported by: 2

Documentation

Overview

Package schema is a generated protocol buffer package.

It is generated from these files:

site.proto

It has these top-level messages:

RegisterCall
LoginCall
InfoCall
User

Package schema is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterUsersHandler

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

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

func RegisterUsersHandlerFromEndpoint

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

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

func RegisterUsersServer

func RegisterUsersServer(s *grpc.Server, srv UsersServer)

Types

type InfoCall

type InfoCall struct {
	Username string `protobuf:"bytes,1,opt,name=username" json:"username,omitempty"`
}

func (*InfoCall) Descriptor

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

func (*InfoCall) GetUsername

func (m *InfoCall) GetUsername() string

func (*InfoCall) ProtoMessage

func (*InfoCall) ProtoMessage()

func (*InfoCall) Reset

func (m *InfoCall) Reset()

func (*InfoCall) String

func (m *InfoCall) String() string

type LoginCall

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

func (*LoginCall) Descriptor

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

func (*LoginCall) GetPassword

func (m *LoginCall) GetPassword() string

func (*LoginCall) GetUsername

func (m *LoginCall) GetUsername() string

func (*LoginCall) ProtoMessage

func (*LoginCall) ProtoMessage()

func (*LoginCall) Reset

func (m *LoginCall) Reset()

func (*LoginCall) String

func (m *LoginCall) String() string

type RegisterCall

type RegisterCall struct {
	User            *User  `protobuf:"bytes,1,opt,name=user" json:"user,omitempty"`
	Password        string `protobuf:"bytes,2,opt,name=password" json:"password,omitempty"`
	PasswordConfirm string `protobuf:"bytes,3,opt,name=password_confirm,json=passwordConfirm" json:"password_confirm,omitempty"`
}

func (*RegisterCall) Descriptor

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

func (*RegisterCall) GetPassword

func (m *RegisterCall) GetPassword() string

func (*RegisterCall) GetPasswordConfirm

func (m *RegisterCall) GetPasswordConfirm() string

func (*RegisterCall) GetUser

func (m *RegisterCall) GetUser() *User

func (*RegisterCall) ProtoMessage

func (*RegisterCall) ProtoMessage()

func (*RegisterCall) Reset

func (m *RegisterCall) Reset()

func (*RegisterCall) String

func (m *RegisterCall) String() string

type User

type User struct {
	Username      string `protobuf:"bytes,1,opt,name=username" json:"username,omitempty"`
	Email         string `protobuf:"bytes,2,opt,name=email" json:"email,omitempty"`
	IsAdmin       bool   `protobuf:"varint,3,opt,name=is_admin,json=isAdmin" json:"is_admin,omitempty"`
	IsDj          bool   `protobuf:"varint,4,opt,name=is_dj,json=isDj" json:"is_dj,omitempty"`
	TwitterHandle string `protobuf:"bytes,5,opt,name=twitter_handle,json=twitterHandle" json:"twitter_handle,omitempty"`
}

func (*User) Descriptor

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

func (*User) GetEmail

func (m *User) GetEmail() string

func (*User) GetIsAdmin

func (m *User) GetIsAdmin() bool

func (*User) GetIsDj

func (m *User) GetIsDj() bool

func (*User) GetTwitterHandle

func (m *User) GetTwitterHandle() string

func (*User) GetUsername

func (m *User) GetUsername() string

func (*User) ProtoMessage

func (*User) ProtoMessage()

func (*User) Reset

func (m *User) Reset()

func (*User) String

func (m *User) String() string

type UsersClient

type UsersClient interface {
	Register(ctx context.Context, in *RegisterCall, opts ...grpc.CallOption) (*User, error)
	Login(ctx context.Context, in *LoginCall, opts ...grpc.CallOption) (*User, error)
	Info(ctx context.Context, in *InfoCall, opts ...grpc.CallOption) (*User, error)
}

func NewUsersClient

func NewUsersClient(cc *grpc.ClientConn) UsersClient

type UsersServer

type UsersServer interface {
	Register(context.Context, *RegisterCall) (*User, error)
	Login(context.Context, *LoginCall) (*User, error)
	Info(context.Context, *InfoCall) (*User, error)
}

Jump to

Keyboard shortcuts

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