Documentation ¶
Index ¶
- Constants
- type Service
- func (s *Service) Create(ctx context.Context, r *proto.CreateRequest) (*proto.CreateResponse, error)
- func (s *Service) DeleteById(ctx context.Context, r *proto.DeleteByIdRequest) (*proto.DeleteByIdResponse, error)
- func (s *Service) FindById(ctx context.Context, r *proto.FindByIdRequest) (*proto.FindByIdResponse, error)
- func (s *Service) FindMany(ctx context.Context, r *proto.FindManyRequest) (*proto.FindManyResponse, error)
- type Store
- func (s *Store) Create(ctx context.Context, accountId int64, input *proto.InputClient) (int64, error)
- func (s *Store) DeleteById(ctx context.Context, accountId, id int64) error
- func (s *Store) FindById(ctx context.Context, accountId, id int64) (*proto.Client, error)
- func (s *Store) FindByIdentifier(ctx context.Context, identifier string) (*proto.Client, error)
- func (s *Store) FindMany(ctx context.Context, accountId int64) ([]*proto.Client, error)
- type Storer
Constants ¶
View Source
const ( ErrMissingId = "missing id argument" ErrClientNotFound = "could not find client with id `%d'" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct { proto.UnimplementedClientServiceServer // contains filtered or unexported fields }
func NewService ¶
func (*Service) Create ¶
func (s *Service) Create(ctx context.Context, r *proto.CreateRequest) (*proto.CreateResponse, error)
func (*Service) DeleteById ¶
func (s *Service) DeleteById(ctx context.Context, r *proto.DeleteByIdRequest) (*proto.DeleteByIdResponse, error)
func (*Service) FindById ¶
func (s *Service) FindById(ctx context.Context, r *proto.FindByIdRequest) (*proto.FindByIdResponse, error)
func (*Service) FindMany ¶
func (s *Service) FindMany(ctx context.Context, r *proto.FindManyRequest) (*proto.FindManyResponse, error)
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) DeleteById ¶
func (*Store) FindByIdentifier ¶
type Storer ¶
type Storer interface { Create(ctx context.Context, accountId int64, input *proto.InputClient) (int64, error) FindMany(ctx context.Context, accountId int64) ([]*proto.Client, error) FindById(ctx context.Context, accountId, id int64) (*proto.Client, error) DeleteById(ctx context.Context, accountId, id int64) error }
Click to show internal directories.
Click to hide internal directories.