organization

package
v0.2.1 Latest Latest
Warning

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

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

Documentation

Overview

Package organization implements functionality related to Phobos orgs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateOrganizationInput

type CreateOrganizationInput struct {
	Name        string
	Description string
}

CreateOrganizationInput is the input for creating an organization

type DeleteOrganizationInput

type DeleteOrganizationInput struct {
	Version *int
	ID      string
}

DeleteOrganizationInput is the input for deleting an organization

type GetOrganizationsInput

type GetOrganizationsInput struct {
	// Sort specifies the field to sort on and direction
	Sort *db.OrganizationSortableField
	// PaginationOptions supports cursor based pagination
	PaginationOptions *pagination.Options
	// Search is used to search for a organization by name
	Search *string
}

GetOrganizationsInput is the input for querying a list of organizations

type Service

type Service interface {
	GetOrganizationByID(ctx context.Context, id string) (*models.Organization, error)
	GetOrganizationByPRN(ctx context.Context, prn string) (*models.Organization, error)
	GetOrganizationsByIDs(ctx context.Context, idList []string) ([]models.Organization, error)
	GetOrganizations(ctx context.Context, input *GetOrganizationsInput) (*db.OrganizationsResult, error)
	CreateOrganization(ctx context.Context, input *CreateOrganizationInput) (*models.Organization, error)
	UpdateOrganization(ctx context.Context, input *UpdateOrganizationInput) (*models.Organization, error)
	DeleteOrganization(ctx context.Context, input *DeleteOrganizationInput) error
}

Service implements all organization related functionality

func NewService

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

NewService returns an instance of Service

type UpdateOrganizationInput

type UpdateOrganizationInput struct {
	Version     *int
	Description *string
	ID          string
}

UpdateOrganizationInput is the input for updating an organization

Jump to

Keyboard shortcuts

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