Documentation ¶
Overview ¶
Package users defines the protocol buffers API for the users service.
Index ¶
- Constants
- Variables
- func RegisterUsersHandler(s server.Server, hdlr UsersHandler, opts ...server.HandlerOption) error
- func RegisterUsersServer(s *grpc.Server, srv UsersServer)
- type Client
- type User
- func (u *User) AsUpdateDocument() bson.M
- func (*User) Descriptor() ([]byte, []int)
- func (m *User) GetCreatedAt() *time.Time
- func (m *User) GetDeletedAt() *time.Time
- func (m *User) GetEmail() string
- func (m *User) GetId() *uuid.UUID
- func (m *User) GetName() string
- func (m *User) GetUpdatedAt() *time.Time
- func (m *User) Marshal() (dAtA []byte, err error)
- func (m *User) MarshalTo(dAtA []byte) (int, error)
- func (*User) ProtoMessage()
- func (m *User) Reset()
- func (m *User) Size() (n int)
- func (m *User) String() string
- func (m *User) Unmarshal(dAtA []byte) error
- func (m *User) XXX_DiscardUnknown()
- func (m *User) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *User) XXX_Merge(src proto.Message)
- func (m *User) XXX_Size() int
- func (m *User) XXX_Unmarshal(b []byte) error
- type UsersClient
- type UsersHandler
- type UsersServer
- type UsersService
Constants ¶
View Source
const Name = "com.koverto.svc.users"
Name is the identifying name of the Users service.
Variables ¶
View Source
var ( ErrInvalidLengthUsers = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowUsers = fmt.Errorf("proto: integer overflow") )
Functions ¶
func RegisterUsersHandler ¶
func RegisterUsersHandler(s server.Server, hdlr UsersHandler, opts ...server.HandlerOption) error
func RegisterUsersServer ¶
func RegisterUsersServer(s *grpc.Server, srv UsersServer)
Types ¶
type Client ¶ added in v1.0.1
type Client struct {
UsersService
}
Client defines a client for the Users service.
type User ¶
type User struct { Id *uuid.UUID `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" bson:"_id"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` CreatedAt *time.Time `protobuf:"bytes,4,opt,name=createdAt,proto3,stdtime" json:"createdAt,omitempty"` UpdatedAt *time.Time `protobuf:"bytes,5,opt,name=updatedAt,proto3,stdtime" json:"updatedAt,omitempty"` DeletedAt *time.Time `protobuf:"bytes,6,opt,name=deletedAt,proto3,stdtime" json:"deletedAt,omitempty"` }
func (*User) AsUpdateDocument ¶ added in v0.2.0
AsUpdateDocument generates a MongoDB update document for a User object.
func (*User) Descriptor ¶
func (*User) GetCreatedAt ¶
func (*User) GetDeletedAt ¶
func (*User) GetUpdatedAt ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) XXX_DiscardUnknown ¶
func (m *User) XXX_DiscardUnknown()
func (*User) XXX_Unmarshal ¶
type UsersClient ¶
type UsersClient interface { Create(ctx context.Context, in *User, opts ...grpc.CallOption) (*User, error) Read(ctx context.Context, in *User, opts ...grpc.CallOption) (*User, error) Update(ctx context.Context, in *User, opts ...grpc.CallOption) (*User, 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.ClientConn) UsersClient
type UsersHandler ¶
type UsersServer ¶
type UsersServer interface { Create(context.Context, *User) (*User, error) Read(context.Context, *User) (*User, error) Update(context.Context, *User) (*User, error) }
UsersServer is the server API for Users service.
type UsersService ¶
type UsersService interface { Create(ctx context.Context, in *User, opts ...client.CallOption) (*User, error) Read(ctx context.Context, in *User, opts ...client.CallOption) (*User, error) Update(ctx context.Context, in *User, opts ...client.CallOption) (*User, error) }
func NewUsersService ¶
func NewUsersService(name string, c client.Client) UsersService
Click to show internal directories.
Click to hide internal directories.