services

package
v0.5.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 13, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OrganizationService added in v0.5.0

type OrganizationService struct {
	// contains filtered or unexported fields
}

func NewOrganizationService added in v0.5.0

func NewOrganizationService(organizationRepo repositories.OrganizationRepository, teamRepo repositories.TeamRepository, userRepo repositories.UserRepository) *OrganizationService

NewOrganizationService creates a new organization service.

func (*OrganizationService) AddOrganizationMember added in v0.5.0

func (s *OrganizationService) AddOrganizationMember(ctx context.Context, organizationID, userID uuid.UUID, role string) error

AddMember adds a member to an organization.

func (*OrganizationService) AddTeam added in v0.5.0

func (s *OrganizationService) AddTeam(ctx context.Context, organizationID, teamID uuid.UUID) error

AddTeam adds a team to an organization.

func (*OrganizationService) AddTeamMember added in v0.5.0

func (s *OrganizationService) AddTeamMember(ctx context.Context, teamID, userID uuid.UUID, role string) error

AddMember adds a member to a team.

func (*OrganizationService) CreateOrganization added in v0.5.0

func (s *OrganizationService) CreateOrganization(ctx context.Context, organization *entities.Organization) error

CreateOrganization creates a new organization.

func (*OrganizationService) CreateTeam added in v0.5.0

func (s *OrganizationService) CreateTeam(ctx context.Context, team *entities.Team) error

CreateTeam creates a new team.

func (*OrganizationService) CreateUser added in v0.5.0

func (s *OrganizationService) CreateUser(ctx context.Context, user *entities.User) error

CreateUser creates a new user.

func (*OrganizationService) DeleteOrganization added in v0.5.0

func (s *OrganizationService) DeleteOrganization(ctx context.Context, id uuid.UUID) error

DeleteOrganization deletes an organization by ID.

func (*OrganizationService) DeleteTeam added in v0.5.0

func (s *OrganizationService) DeleteTeam(ctx context.Context, id uuid.UUID) error

DeleteTeam deletes a team by ID.

func (*OrganizationService) DeleteUser added in v0.5.0

func (s *OrganizationService) DeleteUser(ctx context.Context, id uuid.UUID) error

DeleteUser deletes a user by ID.

func (*OrganizationService) GetOrganization added in v0.5.0

func (s *OrganizationService) GetOrganization(ctx context.Context, id uuid.UUID) (*entities.Organization, error)

GetOrganization returns an organization by ID.

func (*OrganizationService) GetOrganizations added in v0.5.0

func (s *OrganizationService) GetOrganizations(ctx context.Context) ([]*entities.Organization, error)

GetOrganizations returns all organizations.

func (*OrganizationService) GetTeam added in v0.5.0

func (s *OrganizationService) GetTeam(ctx context.Context, id uuid.UUID) (*entities.Team, error)

GetTeam returns a team by ID.

func (*OrganizationService) GetTeams added in v0.5.0

func (s *OrganizationService) GetTeams(ctx context.Context) ([]*entities.Team, error)

GetTeams returns all teams.

func (*OrganizationService) GetUser added in v0.5.0

func (s *OrganizationService) GetUser(ctx context.Context, id uuid.UUID) (*entities.User, error)

GetUser returns a user by ID.

func (*OrganizationService) GetUserByEmail added in v0.5.0

func (s *OrganizationService) GetUserByEmail(ctx context.Context, email string) (*entities.User, error)

GetUserByEmail returns a user by email.

func (*OrganizationService) GetUserOrganizationsMemberships added in v0.5.0

func (s *OrganizationService) GetUserOrganizationsMemberships(ctx context.Context, userID uuid.UUID) ([]*entities.OrganizationMember, error)

GetUserMemberships returns all memberships of a user.

func (*OrganizationService) GetUserTeamsMemberships added in v0.5.0

func (s *OrganizationService) GetUserTeamsMemberships(ctx context.Context, userID uuid.UUID) ([]*entities.TeamMember, error)

GetUserTeamsMemberships returns all memberships of a user.

func (*OrganizationService) GetUsers added in v0.5.0

func (s *OrganizationService) GetUsers(ctx context.Context) ([]*entities.User, error)

GetUsers returns all users.

func (*OrganizationService) RemoveOrganizationMember added in v0.5.0

func (s *OrganizationService) RemoveOrganizationMember(ctx context.Context, organizationID, userID uuid.UUID) error

RemoveMember removes a member from an organization.

func (*OrganizationService) RemoveTeam added in v0.5.0

func (s *OrganizationService) RemoveTeam(ctx context.Context, organizationID, teamID uuid.UUID) error

RemoveTeam removes a team from an organization.

func (*OrganizationService) RemoveTeamMember added in v0.5.0

func (s *OrganizationService) RemoveTeamMember(ctx context.Context, teamID, userID uuid.UUID) error

RemoveMember removes a member from a team.

func (*OrganizationService) UpdateOrganization added in v0.5.0

func (s *OrganizationService) UpdateOrganization(ctx context.Context, organization *entities.Organization) error

UpdateOrganization updates an organization.

func (*OrganizationService) UpdateOrganizationMemberRole added in v0.5.0

func (s *OrganizationService) UpdateOrganizationMemberRole(ctx context.Context, organizationID, userID uuid.UUID, role string) error

UpdateMemberRole updates the role of a member in an organization.

func (*OrganizationService) UpdateTeam added in v0.5.0

func (s *OrganizationService) UpdateTeam(ctx context.Context, team *entities.Team) error

UpdateTeam updates a team.

func (*OrganizationService) UpdateTeamMemberRole added in v0.5.0

func (s *OrganizationService) UpdateTeamMemberRole(ctx context.Context, teamID, userID uuid.UUID, role string) error

UpdateMemberRole updates the role of a member in a team.

func (*OrganizationService) UpdateUser added in v0.5.0

func (s *OrganizationService) UpdateUser(ctx context.Context, user *entities.User) error

UpdateUser updates a user.

type TaskService

type TaskService struct {
	// contains filtered or unexported fields
}

TaskService is a service that manages tasks.

func NewTaskService

func NewTaskService(taskRepo repositories.TaskRepository, taskRunRepo repositories.TaskRunRepository, tektonClient tektoncd.TektonClient) *TaskService

NewTaskService creates a new TaskService.

func (*TaskService) Create

func (s *TaskService) Create(ctx context.Context, task *entities.Task) error

Create creates a new task.

func (*TaskService) Delete

func (s *TaskService) Delete(ctx context.Context, id uuid.UUID) error

Delete deletes a task by ID.

func (*TaskService) FindAll

func (s *TaskService) FindAll(ctx context.Context, scope *entities.TaskScope) ([]*entities.Task, error)

FindAll returns all tasks.

func (*TaskService) FindByID

func (s *TaskService) FindByID(ctx context.Context, id uuid.UUID, scope *entities.TaskScope) (*entities.Task, error)

FindByID returns a task by ID.

func (*TaskService) FindTaskRunByID added in v0.2.0

func (s *TaskService) FindTaskRunByID(ctx context.Context, taskID uuid.UUID, taskRunID uuid.UUID) (*entities.TaskRun, error)

FindTaskRunByID returns a task run by ID.

func (*TaskService) FindTaskRunLogs added in v0.2.0

func (s *TaskService) FindTaskRunLogs(ctx context.Context, taskID uuid.UUID, taskRunID uuid.UUID) (map[string]string, error)

FindTaskRunLogs returns a stream of logs for a task run.

func (*TaskService) FindTaskRunStatus added in v0.4.0

func (s *TaskService) FindTaskRunStatus(ctx context.Context, taskID uuid.UUID, taskRunID uuid.UUID) (tekton.TaskRunStatus, error)

FindTaskRunStatus returns the status of a task run.

func (*TaskService) FindTaskRuns added in v0.2.0

func (s *TaskService) FindTaskRuns(ctx context.Context, taskID uuid.UUID) ([]*entities.TaskRun, error)

FindTaskRuns returns all task runs for a task.

func (*TaskService) GetTaskScopeFromContext added in v0.5.0

func (s *TaskService) GetTaskScopeFromContext(ctx context.Context) *entities.TaskScope

GetTaskScopeFromContext returns a task scope from a context.

func (*TaskService) Run

func (s *TaskService) Run(ctx context.Context, taskID uuid.UUID, taskRunID uuid.UUID, scope *entities.TaskScope) error

Run runs a task.

func (*TaskService) Update

func (s *TaskService) Update(ctx context.Context, task *entities.Task) error

Update updates a task.

type TriggerService

type TriggerService struct {
	// contains filtered or unexported fields
}

TriggerService is a service that manages triggers.

func NewTriggerService

func NewTriggerService(repo repositories.TriggerRepository) *TriggerService

NewTriggerService creates a new TriggerService.

func (*TriggerService) Create

func (s *TriggerService) Create(ctx context.Context, trigger *entities.Trigger) error

Create creates a new trigger.

func (*TriggerService) Delete

func (s *TriggerService) Delete(ctx context.Context, id uuid.UUID) error

Delete deletes a trigger by ID.

func (*TriggerService) FindAll

func (s *TriggerService) FindAll(ctx context.Context) ([]*entities.Trigger, error)

FindAll returns all triggers.

func (*TriggerService) FindByID

func (s *TriggerService) FindByID(ctx context.Context, id uuid.UUID) (*entities.Trigger, error)

FindByID returns a trigger by ID.

func (*TriggerService) Update

func (s *TriggerService) Update(ctx context.Context, trigger *entities.Trigger) error

Update updates a trigger.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL