proto

package
v0.0.0-...-c298ccb Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2018 License: MIT Imports: 6 Imported by: 3

Documentation

Overview

Package proto is a generated protocol buffer package.

It is generated from these files:

user.proto

It has these top-level messages:

UserId
User
CreateRequest
UpdateRequest

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterUserServiceServer

func RegisterUserServiceServer(s *grpc.Server, srv UserServiceServer)

Types

type CreateRequest

type CreateRequest struct {
	Name     string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	Email    string `protobuf:"bytes,2,opt,name=email" json:"email,omitempty"`
	Location string `protobuf:"bytes,3,opt,name=location" json:"location,omitempty"`
	Language string `protobuf:"bytes,4,opt,name=language" json:"language,omitempty"`
}

func (*CreateRequest) Descriptor

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

func (*CreateRequest) GetEmail

func (m *CreateRequest) GetEmail() string

func (*CreateRequest) GetLanguage

func (m *CreateRequest) GetLanguage() string

func (*CreateRequest) GetLocation

func (m *CreateRequest) GetLocation() string

func (*CreateRequest) GetName

func (m *CreateRequest) GetName() string

func (*CreateRequest) ProtoMessage

func (*CreateRequest) ProtoMessage()

func (*CreateRequest) Reset

func (m *CreateRequest) Reset()

func (*CreateRequest) String

func (m *CreateRequest) String() string

type UpdateRequest

type UpdateRequest struct {
	Id       int64  `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
	Name     string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"`
	Email    string `protobuf:"bytes,3,opt,name=email" json:"email,omitempty"`
	Location string `protobuf:"bytes,4,opt,name=location" json:"location,omitempty"`
	Language string `protobuf:"bytes,5,opt,name=language" json:"language,omitempty"`
}

func (*UpdateRequest) Descriptor

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

func (*UpdateRequest) GetEmail

func (m *UpdateRequest) GetEmail() string

func (*UpdateRequest) GetId

func (m *UpdateRequest) GetId() int64

func (*UpdateRequest) GetLanguage

func (m *UpdateRequest) GetLanguage() string

func (*UpdateRequest) GetLocation

func (m *UpdateRequest) GetLocation() string

func (*UpdateRequest) GetName

func (m *UpdateRequest) GetName() string

func (*UpdateRequest) ProtoMessage

func (*UpdateRequest) ProtoMessage()

func (*UpdateRequest) Reset

func (m *UpdateRequest) Reset()

func (*UpdateRequest) String

func (m *UpdateRequest) String() string

type User

type User struct {
	Id          int64                      `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
	Name        string                     `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"`
	Email       string                     `protobuf:"bytes,3,opt,name=email" json:"email,omitempty"`
	Location    string                     `protobuf:"bytes,4,opt,name=location" json:"location,omitempty"`
	Language    string                     `protobuf:"bytes,5,opt,name=language" json:"language,omitempty"`
	Created     *google_protobuf.Timestamp `protobuf:"bytes,6,opt,name=created" json:"created,omitempty"`
	LastChanged *google_protobuf.Timestamp `protobuf:"bytes,7,opt,name=lastChanged" json:"lastChanged,omitempty"`
}

func (*User) Descriptor

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

func (*User) GetCreated

func (m *User) GetCreated() *google_protobuf.Timestamp

func (*User) GetEmail

func (m *User) GetEmail() string

func (*User) GetId

func (m *User) GetId() int64

func (*User) GetLanguage

func (m *User) GetLanguage() string

func (*User) GetLastChanged

func (m *User) GetLastChanged() *google_protobuf.Timestamp

func (*User) GetLocation

func (m *User) GetLocation() string

func (*User) GetName

func (m *User) GetName() string

func (*User) ProtoMessage

func (*User) ProtoMessage()

func (*User) Reset

func (m *User) Reset()

func (*User) String

func (m *User) String() string

type UserId

type UserId struct {
	Value int64 `protobuf:"varint,1,opt,name=value" json:"value,omitempty"`
}

func (*UserId) Descriptor

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

func (*UserId) GetValue

func (m *UserId) GetValue() int64

func (*UserId) ProtoMessage

func (*UserId) ProtoMessage()

func (*UserId) Reset

func (m *UserId) Reset()

func (*UserId) String

func (m *UserId) String() string

type UserServiceClient

type UserServiceClient interface {
	Get(ctx context.Context, in *UserId, opts ...grpc.CallOption) (*User, error)
	Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*UserId, error)
	Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*UserId, error)
	Delete(ctx context.Context, in *UserId, opts ...grpc.CallOption) (*UserId, error)
}

func NewUserServiceClient

func NewUserServiceClient(cc *grpc.ClientConn) UserServiceClient

type UserServiceServer

type UserServiceServer interface {
	Get(context.Context, *UserId) (*User, error)
	Create(context.Context, *CreateRequest) (*UserId, error)
	Update(context.Context, *UpdateRequest) (*UserId, error)
	Delete(context.Context, *UserId) (*UserId, error)
}

Jump to

Keyboard shortcuts

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