Documentation ¶
Index ¶
- Variables
- type DatabaseOperations
- func (dbt *DatabaseOperations) AddUser(name, userEmail string) error
- func (dbt *DatabaseOperations) Create(name, email, url string) error
- func (dbt *DatabaseOperations) HasUser(name, userEmail string) (bool, error)
- func (dbt *DatabaseOperations) List() ([]*database.Team, error)
- func (dbt *DatabaseOperations) ListByUser(userEmail string) ([]*database.Team, error)
- func (dbt *DatabaseOperations) RemoveUser(name, userEmail string) error
- func (dbt *DatabaseOperations) Rename(oldName, newName string) error
- func (dbt *DatabaseOperations) SetTeamExt(ext teamext.TeamExt)
- type FakeOperations
- func (f *FakeOperations) AddUser(name, userEmail string) error
- func (f *FakeOperations) Create(name, email, url string) error
- func (f *FakeOperations) HasUser(name, userEmail string) (bool, error)
- func (f *FakeOperations) List() ([]*database.Team, error)
- func (f *FakeOperations) ListByUser(userEmail string) ([]*database.Team, error)
- func (f *FakeOperations) RemoveUser(name, userEmail string) error
- func (f *FakeOperations) Rename(oldName, newName string) error
- func (f *FakeOperations) SetTeamExt(ext teamext.TeamExt)
- type Operations
- type Service
- func (s *Service) AddUser(ctx context.Context, request *teampb.AddUserRequest) (*teampb.Empty, error)
- func (s *Service) Create(ctx context.Context, request *teampb.CreateRequest) (*teampb.Empty, error)
- func (s *Service) List(ctx context.Context, _ *teampb.Empty) (*teampb.ListResponse, error)
- func (s *Service) RegisterService(grpcServer *grpc.Server)
- func (s *Service) RemoveUser(ctx context.Context, request *teampb.RemoveUserRequest) (*teampb.Empty, error)
- func (s *Service) Rename(ctx context.Context, request *teampb.RenameRequest) (*teampb.Empty, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrTeamAlreadyExists = status.Errorf(codes.AlreadyExists, "Team already exists") ErrUserAlreadyInTeam = status.Errorf(codes.AlreadyExists, "User already in Team") ErrNotFound = status.Errorf(codes.NotFound, "Team Not Found") ErrUserNotInTeam = status.Errorf(codes.NotFound, "User not in team") )
Functions ¶
This section is empty.
Types ¶
type DatabaseOperations ¶
func (*DatabaseOperations) AddUser ¶
func (dbt *DatabaseOperations) AddUser(name, userEmail string) error
func (*DatabaseOperations) Create ¶
func (dbt *DatabaseOperations) Create(name, email, url string) error
func (*DatabaseOperations) HasUser ¶ added in v0.16.0
func (dbt *DatabaseOperations) HasUser(name, userEmail string) (bool, error)
func (*DatabaseOperations) ListByUser ¶
func (dbt *DatabaseOperations) ListByUser(userEmail string) ([]*database.Team, error)
func (*DatabaseOperations) RemoveUser ¶ added in v0.8.0
func (dbt *DatabaseOperations) RemoveUser(name, userEmail string) error
func (*DatabaseOperations) Rename ¶ added in v0.10.0
func (dbt *DatabaseOperations) Rename(oldName, newName string) error
func (*DatabaseOperations) SetTeamExt ¶ added in v0.10.0
func (dbt *DatabaseOperations) SetTeamExt(ext teamext.TeamExt)
type FakeOperations ¶
type FakeOperations struct { Storage map[string]*database.Team UserOps user.Operations // contains filtered or unexported fields }
func (*FakeOperations) AddUser ¶
func (f *FakeOperations) AddUser(name, userEmail string) error
func (*FakeOperations) Create ¶
func (f *FakeOperations) Create(name, email, url string) error
func (*FakeOperations) HasUser ¶ added in v0.16.0
func (f *FakeOperations) HasUser(name, userEmail string) (bool, error)
func (*FakeOperations) ListByUser ¶
func (f *FakeOperations) ListByUser(userEmail string) ([]*database.Team, error)
func (*FakeOperations) RemoveUser ¶ added in v0.8.0
func (f *FakeOperations) RemoveUser(name, userEmail string) error
func (*FakeOperations) Rename ¶ added in v0.10.0
func (f *FakeOperations) Rename(oldName, newName string) error
func (*FakeOperations) SetTeamExt ¶ added in v0.10.0
func (f *FakeOperations) SetTeamExt(ext teamext.TeamExt)
type Operations ¶
type Operations interface { Create(name, email, url string) error AddUser(name, userEmail string) error List() ([]*database.Team, error) ListByUser(userEmail string) ([]*database.Team, error) RemoveUser(name, userEmail string) error Rename(oldName, newName string) error HasUser(name, userEmail string) (bool, error) SetTeamExt(ext teamext.TeamExt) }
func NewDatabaseOperations ¶
func NewDatabaseOperations(db *gorm.DB, uOps user.Operations) Operations
func NewFakeOperations ¶
func NewFakeOperations() Operations
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(ops Operations) *Service
func (*Service) RegisterService ¶
func (*Service) RemoveUser ¶ added in v0.8.0
Click to show internal directories.
Click to hide internal directories.