users

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2020 License: AGPL-3.0 Imports: 16 Imported by: 1

Documentation

Overview

Package users defines the protocol buffers API for the users service.

Index

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.

func NewClient added in v1.0.1

func NewClient(client client.Client) *Client

NewClient creates a new client for the Users service.

func (*Client) Name added in v1.0.1

func (c *Client) Name() string

Name returns the name of 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

func (u *User) AsUpdateDocument() bson.M

AsUpdateDocument generates a MongoDB update document for a User object.

func (*User) Descriptor

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

func (*User) GetCreatedAt

func (m *User) GetCreatedAt() *time.Time

func (*User) GetDeletedAt

func (m *User) GetDeletedAt() *time.Time

func (*User) GetEmail

func (m *User) GetEmail() string

func (*User) GetId

func (m *User) GetId() *uuid.UUID

func (*User) GetName

func (m *User) GetName() string

func (*User) GetUpdatedAt

func (m *User) GetUpdatedAt() *time.Time

func (*User) Marshal

func (m *User) Marshal() (dAtA []byte, err error)

func (*User) MarshalTo

func (m *User) MarshalTo(dAtA []byte) (int, error)

func (*User) ProtoMessage

func (*User) ProtoMessage()

func (*User) Reset

func (m *User) Reset()

func (*User) Size

func (m *User) Size() (n int)

func (*User) String

func (m *User) String() string

func (*User) Unmarshal

func (m *User) Unmarshal(dAtA []byte) error

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 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 UsersHandler interface {
	Create(context.Context, *User, *User) error
	Read(context.Context, *User, *User) error
	Update(context.Context, *User, *User) error
}

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

Jump to

Keyboard shortcuts

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