Documentation ¶
Index ¶
- Constants
- Variables
- type Authenticator
- type Option
- type S
- func (s *S) Address() string
- func (s *S) CreateProject(ctx echo.Context) (err error)
- func (s *S) DeleteProject(ctx echo.Context, projectId string) (err error)
- func (s *S) DeleteProjectArtifact(ctx echo.Context, projectName, artifactId string) (err error)
- func (s *S) GetHealth(ctx echo.Context) error
- func (s *S) GetProject(ctx echo.Context, projectId string) (err error)
- func (s *S) GetProjectArtifact(ctx echo.Context, projectName, artifactId string) (err error)
- func (s *S) GetProjectArtifacts(ctx echo.Context, projectName string) (err error)
- func (s *S) GetProjects(ctx echo.Context) (err error)
- func (s *S) ProjectArtifactExists(ctx echo.Context, projectName, artifactId string) (err error)
- func (s *S) ProjectExists(ctx echo.Context, projectId string) (err error)
- func (s *S) Start() (err error)
- func (s *S) Stop() (err error)
- func (s *S) UploadArtifact(ctx echo.Context, projectName string) (err error)
Constants ¶
const (
HeaderBobExists = "Bob-Exists"
)
Variables ¶
var ( ErrServerAlreadyStarted = fmt.Errorf("Server already started") ErrTooManyListenConfigs = fmt.Errorf("Only http or unix config can be set, not both") ErrInvalidBase64Encoding = fmt.Errorf("Invalid base64 encoding") ErrServerNotStarted = fmt.Errorf("Server not started yet") ErrInvalidProjectID = fmt.Errorf("Project ID is not in valid format") )
var (
DefaultUploadDir = filepath.Join(os.TempDir(), "./upload")
)
Functions ¶
This section is empty.
Types ¶
type Authenticator ¶
type Authenticator interface {
Authenticate(ctx echo.Context) (err error)
}
type Option ¶
type Option func(s *S)
func WithArtifactService ¶
func WithArtifactService(srv application.Application) Option
func WithAuthenticator ¶
func WithAuthenticator(authn Authenticator) Option
func WithUploadDir ¶
type S ¶
type S struct {
// contains filtered or unexported fields
}
func (*S) CreateProject ¶
Create a new project by name. also adds the hashes after the creation of project (POST /api/project)
func (*S) DeleteProject ¶
Delete a project by id. (DELETE /api/project/{project_id})
func (*S) DeleteProjectArtifact ¶
DeleteProjectArtifact deletes a project artifact (DELETE /api/project/{projectName}/artifact/{artifactId})
func (*S) GetProject ¶
Returns a single project by id. (GET /api/project/{project_id})
func (*S) GetProjectArtifact ¶
GetProjectArtifact returns specific project artifact (GET /api/project/{projectName}/artifact/{artifactId})
func (*S) GetProjectArtifacts ¶
GetProjectArtifacts returns a list of all the artifacts of a project (GET /api/project/{projectName}/artifacts)
func (*S) GetProjects ¶
Returns a list of projects with name and ID, without hashes. (GET /api/projects)
func (*S) ProjectArtifactExists ¶
ProjectArtifactExists returns http.StatusConflict if artifact exists under a project, else http.StatusOK. (HEAD /api/project/{projectName}/artifact/{artifactId})
func (*S) ProjectExists ¶
func (*S) UploadArtifact ¶
UploadArtifact creates a new artifact inside a project (POST /api/project/{projectName}/artifacts
Directories ¶
Path | Synopsis |
---|---|
Package generated provides primitives to interact with the openapi HTTP API.
|
Package generated provides primitives to interact with the openapi HTTP API. |