team

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: MPL-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package team package

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddUserToTeamInput added in v0.12.0

type AddUserToTeamInput struct {
	TeamName     string
	Username     string
	IsMaintainer bool
}

AddUserToTeamInput is the input for adding a new team member.

type CreateTeamInput added in v0.12.0

type CreateTeamInput struct {
	Name        string
	Description string
}

CreateTeamInput is the input for creating a team.

type DeleteTeamInput added in v0.12.0

type DeleteTeamInput struct {
	Team *models.Team
}

DeleteTeamInput is the input for deleting a team.

type GetTeamMembersInput

type GetTeamMembersInput struct {
	// Sort specifies the field to sort on and direction
	Sort *db.TeamMemberSortableField
	// PaginationOptions supports cursor based pagination
	PaginationOptions *pagination.Options
	// UserID filters the team members by user ID
	UserID *string
	// TeamID filters the team members by user ID
	TeamID *string
}

GetTeamMembersInput is the input for querying a list of team members

type GetTeamsInput

type GetTeamsInput struct {
	// Sort specifies the field to sort on and direction
	Sort *db.TeamSortableField
	// PaginationOptions supports cursor based pagination
	PaginationOptions *pagination.Options
	// TeamNamePrefix filters team list by teamName prefix
	TeamNamePrefix *string
}

GetTeamsInput is the input for querying a list of teams

type RemoveUserFromTeamInput added in v0.12.0

type RemoveUserFromTeamInput struct {
	TeamMember *models.TeamMember
}

RemoveUserFromTeamInput is the input for deleting a team member.

type Service

type Service interface {
	GetTeamByID(ctx context.Context, id string) (*models.Team, error)
	GetTeamByName(ctx context.Context, name string) (*models.Team, error)
	GetTeamsByIDs(ctx context.Context, idList []string) ([]models.Team, error)
	GetTeams(ctx context.Context, input *GetTeamsInput) (*db.TeamsResult, error)
	CreateTeam(ctx context.Context, input *CreateTeamInput) (*models.Team, error)
	UpdateTeam(ctx context.Context, input *UpdateTeamInput) (*models.Team, error)
	DeleteTeam(ctx context.Context, input *DeleteTeamInput) error
	GetTeamMember(ctx context.Context, username, teamName string) (*models.TeamMember, error)
	GetTeamMembers(ctx context.Context, input *db.GetTeamMembersInput) (*db.TeamMembersResult, error)
	AddUserToTeam(ctx context.Context, input *AddUserToTeamInput) (*models.TeamMember, error)
	UpdateTeamMember(ctx context.Context, input *UpdateTeamMemberInput) (*models.TeamMember, error)
	RemoveUserFromTeam(ctx context.Context, input *RemoveUserFromTeamInput) error
}

Service implements all team related functionality

func NewService

func NewService(
	logger logger.Logger,
	dbClient *db.Client,
	activityService activityevent.Service,
) Service

NewService creates an instance of Service

type UpdateTeamInput added in v0.12.0

type UpdateTeamInput struct {
	MetadataVersion *int
	Description     *string
	Name            string
}

UpdateTeamInput is the input for updating a team.

type UpdateTeamMemberInput added in v0.12.0

type UpdateTeamMemberInput struct {
	MetadataVersion *int
	TeamName        string
	Username        string
	IsMaintainer    bool
}

UpdateTeamMemberInput is the input for updating a team member.

Jump to

Keyboard shortcuts

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