protocol

package
v0.0.1-alpha Latest Latest
Warning

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

Go to latest
Published: May 17, 2020 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterUsersServer

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

Types

type Created

type Created struct {
	Uid                  string   `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Created) Descriptor

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

func (*Created) GetUid

func (m *Created) GetUid() string

func (*Created) ProtoMessage

func (*Created) ProtoMessage()

func (*Created) Reset

func (m *Created) Reset()

func (*Created) String

func (m *Created) String() string

func (*Created) XXX_DiscardUnknown

func (m *Created) XXX_DiscardUnknown()

func (*Created) XXX_Marshal

func (m *Created) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Created) XXX_Merge

func (m *Created) XXX_Merge(src proto.Message)

func (*Created) XXX_Size

func (m *Created) XXX_Size() int

func (*Created) XXX_Unmarshal

func (m *Created) XXX_Unmarshal(b []byte) error

type Empty

type Empty struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

common practice to represent empty messages

func (*Empty) Descriptor

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

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) Reset

func (m *Empty) Reset()

func (*Empty) String

func (m *Empty) String() string

func (*Empty) XXX_DiscardUnknown

func (m *Empty) XXX_DiscardUnknown()

func (*Empty) XXX_Marshal

func (m *Empty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Empty) XXX_Merge

func (m *Empty) XXX_Merge(src proto.Message)

func (*Empty) XXX_Size

func (m *Empty) XXX_Size() int

func (*Empty) XXX_Unmarshal

func (m *Empty) XXX_Unmarshal(b []byte) error

type UnimplementedUsersServer

type UnimplementedUsersServer struct {
}

UnimplementedUsersServer can be embedded to have forward compatible implementations.

func (*UnimplementedUsersServer) List

func (*UnimplementedUsersServer) SignUp

func (*UnimplementedUsersServer) SignUp(ctx context.Context, req *User) (*Created, error)

type User

type User struct {
	FirstName            string   `protobuf:"bytes,1,opt,name=first_name,json=firstName,proto3" json:"first_name,omitempty"`
	LastName             string   `protobuf:"bytes,2,opt,name=last_name,json=lastName,proto3" json:"last_name,omitempty"`
	Photo                int32    `protobuf:"varint,3,opt,name=photo,proto3" json:"photo,omitempty"`
	Friends              []*User  `protobuf:"bytes,4,rep,name=friends,proto3" json:"friends,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*User) Descriptor

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

func (*User) GetFirstName

func (m *User) GetFirstName() string

func (*User) GetFriends

func (m *User) GetFriends() []*User

func (*User) GetLastName

func (m *User) GetLastName() string

func (*User) GetPhoto

func (m *User) GetPhoto() int32

func (*User) ProtoMessage

func (*User) ProtoMessage()

func (*User) Reset

func (m *User) Reset()

func (*User) String

func (m *User) String() string

func (*User) XXX_DiscardUnknown

func (m *User) XXX_DiscardUnknown()

func (*User) XXX_Marshal

func (m *User) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*User) XXX_Merge

func (m *User) XXX_Merge(src proto.Message)

func (*User) XXX_Size

func (m *User) XXX_Size() int

func (*User) XXX_Unmarshal

func (m *User) XXX_Unmarshal(b []byte) error

type UserList

type UserList struct {
	Users                []*User  `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*UserList) Descriptor

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

func (*UserList) GetUsers

func (m *UserList) GetUsers() []*User

func (*UserList) ProtoMessage

func (*UserList) ProtoMessage()

func (*UserList) Reset

func (m *UserList) Reset()

func (*UserList) String

func (m *UserList) String() string

func (*UserList) XXX_DiscardUnknown

func (m *UserList) XXX_DiscardUnknown()

func (*UserList) XXX_Marshal

func (m *UserList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*UserList) XXX_Merge

func (m *UserList) XXX_Merge(src proto.Message)

func (*UserList) XXX_Size

func (m *UserList) XXX_Size() int

func (*UserList) XXX_Unmarshal

func (m *UserList) XXX_Unmarshal(b []byte) error

type UsersClient

type UsersClient interface {
	// service methods
	SignUp(ctx context.Context, in *User, opts ...grpc.CallOption) (*Created, error)
	List(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*UserList, error)
}

UsersClient is the client API for Users service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewUsersClient

func NewUsersClient(cc grpc.ClientConnInterface) UsersClient

type UsersServer

type UsersServer interface {
	// service methods
	SignUp(context.Context, *User) (*Created, error)
	List(context.Context, *Empty) (*UserList, error)
}

UsersServer is the server API for Users service.

Jump to

Keyboard shortcuts

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