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 ¶
- func RegisterUsersHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterUsersHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterUsersServer(s *grpc.Server, srv UsersServer)
- type InfoCall
- type LoginCall
- type RegisterCall
- type User
- type UsersClient
- type UsersServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterUsersHandler ¶
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) GetUsername ¶
func (*InfoCall) ProtoMessage ¶
func (*InfoCall) ProtoMessage()
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) GetPassword ¶
func (*LoginCall) GetUsername ¶
func (*LoginCall) ProtoMessage ¶
func (*LoginCall) ProtoMessage()
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) GetIsAdmin ¶
func (*User) GetTwitterHandle ¶
func (*User) GetUsername ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
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
Click to show internal directories.
Click to hide internal directories.