Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrArtifactNotFound = errors.New("artifact not found") ErrArtifactAlreadyExists = errors.New("artifact already exists") ErrProjectNotFound = errors.New("project not found") ErrProjectAlreadyExists = errors.New("project already exists") ErrTokenAlreadyExists = errors.New("access token already exists") ErrUserNotFound = errors.New("user not found") ErrUserAlreadyExists = errors.New("user already exists") ErrInvalidUsername = errors.New("invalid username") ErrInvalidProjectName = errors.New("invalid project name") )
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application interface { Projects() (_ []*project.P, err error) Project(id uuid.UUID) (*project.P, error) ProjectByName(name string) (_ *project.P, err error) //ProjectsByName(name string) ([]*project.P, error) ProjectExists(name string) (bool, error) ProjectCreate(name, description string) (*project.P, error) ProjectDelete(id uuid.UUID) error ProjectArtifact(projectID uuid.UUID, artifactID string) (*artifact.A, error) ProjectArtifactExists(projectID uuid.UUID, artifactID string) (bool, error) ProjectArtifactCreate(projectID uuid.UUID, artifactID string, src string, size int) error ProjectArtifactDelete(projectID uuid.UUID, artifactID string) error }
func New ¶
func New(opts ...Option) Application
type Option ¶
type Option func(*application)
func WithProjectRepository ¶
func WithProjectRepository(repo ProjectRepository) Option
type ProjectRepository ¶
type ProjectRepository interface { CreateOrUpdate(project *project.P) error Project(id uuid.UUID) (*project.P, error) ProjectByName(name string) (*project.P, error) Projects() ([]*project.P, error) ProjectDelete(id uuid.UUID) error CreateArtifact(projectID uuid.UUID, artifactID string, filePath string, size int) error ProjectArtifact(projectID uuid.UUID, artifactID string) (*artifact.A, error) ProjectArtifactDelete(projectID uuid.UUID, artifactID string) error ProjectArtifactExists(projectID uuid.UUID, artifactID string) (bool, error) }
Click to show internal directories.
Click to hide internal directories.