Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNotFound is returned when a team was not found. ErrNotFound = errors.New("team not found") // ErrAlreadyAssigned is returned when a team is already assigned. ErrAlreadyAssigned = errors.New("team is already assigned") // ErrNotAssigned is returned when a team is not assigned. ErrNotAssigned = errors.New("team is not assigned") )
Functions ¶
This section is empty.
Types ¶
type LoggingRequestID ¶
LoggingRequestID returns the request ID as string for logging
type Service ¶
type Service interface { List(context.Context) ([]*model.Team, error) Show(context.Context, string) (*model.Team, error) Create(context.Context, *model.Team) (*model.Team, error) Update(context.Context, *model.Team) (*model.Team, error) Delete(context.Context, string) error ListUsers(context.Context, string) ([]*model.TeamUser, error) AppendUser(context.Context, string, string, string) error PermitUser(context.Context, string, string, string) error DropUser(context.Context, string, string) error }
Service handles all interactions with teams.
func NewLoggingService ¶
func NewLoggingService(s Service, requestID LoggingRequestID) Service
NewLoggingService wraps the Service and provides logging for its methods.
func NewService ¶
NewService returns a Service that handles all interactions with teams.
func NewTracingService ¶
func NewTracingService(s Service, requestID TracingRequestID) Service
NewTracingService wraps the Service and provides tracing for its methods.
type Store ¶
type Store interface { List(context.Context) ([]*model.Team, error) Show(context.Context, string) (*model.Team, error) Create(context.Context, *model.Team) (*model.Team, error) Update(context.Context, *model.Team) (*model.Team, error) Delete(context.Context, string) error ListUsers(context.Context, string) ([]*model.TeamUser, error) AppendUser(context.Context, string, string, string) error PermitUser(context.Context, string, string, string) error DropUser(context.Context, string, string) error }
Store defines the interface to persist teams.
type TracingRequestID ¶
TracingRequestID returns the request ID as string for tracing
Click to show internal directories.
Click to hide internal directories.