Documentation ¶
Index ¶
- Variables
- type AuthnService
- type Filter
- type GroupService
- type PolicyService
- type Project
- type RelationService
- type Repository
- type Service
- func (s Service) Create(ctx context.Context, prj Project) (Project, error)
- func (s Service) DeleteModel(ctx context.Context, id string) error
- func (s Service) Disable(ctx context.Context, id string) error
- func (s Service) Enable(ctx context.Context, id string) error
- func (s Service) Get(ctx context.Context, idOrName string) (Project, error)
- func (s Service) List(ctx context.Context, f Filter) ([]Project, error)
- func (s Service) ListByUser(ctx context.Context, principalID, principalType string, flt Filter) ([]Project, error)
- func (s Service) ListGroups(ctx context.Context, id string) ([]group.Group, error)
- func (s Service) ListServiceUsers(ctx context.Context, id string, permissionFilter string) ([]serviceuser.ServiceUser, error)
- func (s Service) ListUsers(ctx context.Context, id string, permissionFilter string) ([]user.User, error)
- func (s Service) Update(ctx context.Context, prj Project) (Project, error)
- type ServiceuserService
- type State
- type UserService
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotExist = errors.New("project or its relations doesn't exist") ErrInvalidUUID = errors.New("invalid syntax of uuid") ErrInvalidID = errors.New("project id is invalid") ErrConflict = errors.New("project already exist") ErrInvalidDetail = errors.New("invalid project detail") )
View Source
var AdminPermission = schema.DeletePermission
View Source
var MemberPermission = schema.GetPermission
View Source
var OwnerRole = schema.RoleProjectOwner
Functions ¶
This section is empty.
Types ¶
type AuthnService ¶ added in v0.7.4
type AuthnService interface {
GetPrincipal(ctx context.Context, via ...authenticate.ClientAssertion) (authenticate.Principal, error)
}
type GroupService ¶ added in v0.7.6
type PolicyService ¶ added in v0.7.4
type RelationService ¶
type RelationService interface { Create(ctx context.Context, rel relation.Relation) (relation.Relation, error) LookupSubjects(ctx context.Context, rel relation.Relation) ([]string, error) LookupResources(ctx context.Context, rel relation.Relation) ([]string, error) Delete(ctx context.Context, rel relation.Relation) error }
type Repository ¶
type Repository interface { GetByID(ctx context.Context, id string) (Project, error) GetByName(ctx context.Context, slug string) (Project, error) Create(ctx context.Context, org Project) (Project, error) List(ctx context.Context, f Filter) ([]Project, error) UpdateByID(ctx context.Context, toUpdate Project) (Project, error) UpdateByName(ctx context.Context, toUpdate Project) (Project, error) Delete(ctx context.Context, id string) error SetState(ctx context.Context, id string, state State) error }
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(repository Repository, relationService RelationService, userService UserService, policyService PolicyService, authnService AuthnService, suserService ServiceuserService, groupService GroupService) *Service
func (Service) DeleteModel ¶
DeleteModel doesn't delete the nested resource, only itself
func (Service) ListByUser ¶
func (Service) ListGroups ¶ added in v0.7.6
func (Service) ListServiceUsers ¶ added in v0.7.5
func (s Service) ListServiceUsers(ctx context.Context, id string, permissionFilter string) ([]serviceuser.ServiceUser, error)
type ServiceuserService ¶ added in v0.7.5
type ServiceuserService interface {
GetByIDs(ctx context.Context, ids []string) ([]serviceuser.ServiceUser, error)
}
Click to show internal directories.
Click to hide internal directories.