Documentation ¶
Index ¶
- func WrappingErrors[InT any, OutT any](f func(context.Context, InT) (OutT, error)) func(context.Context, InT) (OutT, error)
- type CreateRequest
- type Service
- func (s Service[Arg, OutT]) Create(ctx context.Context, in CreateRequest[Arg]) (OutT, error)
- func (s Service[Arg, OutT]) Delete(ctx context.Context, in WithResourceId) (*commonpb.Empty, error)
- func (s Service[Arg, OutT]) Read(ctx context.Context, in WithResourceId) (OutT, error)
- func (s Service[Arg, OutT]) Update(ctx context.Context, in UpdateRequest[Arg]) (OutT, error)
- type UpdateRequest
- type WithResourceId
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CreateRequest ¶
type Service ¶
type Service[Arg proto.Message, OutT proto.Message] struct { Db *db.Database Converters converter.ResourceConverters[Arg, OutT] }
func (Service[Arg, OutT]) Create ¶
func (s Service[Arg, OutT]) Create(ctx context.Context, in CreateRequest[Arg]) (OutT, error)
type UpdateRequest ¶
type UpdateRequest[Arg proto.Message] interface { GetResource() Arg WithResourceId }
type WithResourceId ¶
Click to show internal directories.
Click to hide internal directories.