project

package
v1.0.10 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrProjectDoesNotExist = errors.New("project does not exist")
)

errors

Functions

func Configure

func Configure(api *operations.ClaAPI, service Service)

Configure establishes the middleware handlers for the project service

Types

type DBProjectModel added in v1.0.8

type DBProjectModel struct {
	DateCreated                      string   `dynamodbav:"date_created"`
	DateModified                     string   `dynamodbav:"date_modified"`
	ProjectExternalID                string   `dynamodbav:"project_external_id"`
	ProjectID                        string   `dynamodbav:"project_id"`
	ProjectName                      string   `dynamodbav:"project_name"`
	Version                          string   `dynamodbav:"version"`
	ProjectCclaEnabled               bool     `dynamodbav:"project_ccla_enabled"`
	ProjectCclaRequiresIclaSignature bool     `dynamodbav:"project_ccla_requires_icla_signature"`
	ProjectIclaEnabled               bool     `dynamodbav:"project_icla_enabled"`
	ProjectACL                       []string `dynamodbav:"project_acl"`
}

DBProjectModel data model

type Repository

type Repository interface {
	GetMetrics() (*models.ProjectMetrics, error)
	GetProject(projectID string) (*models.Project, error)
	GetProjects() ([]models.Project, error)
	// contains filtered or unexported methods
}

Repository defines functions of Project repository

func NewDynamoRepository added in v1.0.4

func NewDynamoRepository(awsSession *session.Session, stage string) Repository

NewDynamoRepository creates instance of project repository

type Service

type Service interface {
	GetProjects() ([]models.Project, error)
	GetProjectByID(projectID string) (*models.Project, error)
}

Service interface defines the project service methods/functions

func NewService

func NewService(projectRepo Repository) Service

NewService returns an instance of the project service

Jump to

Keyboard shortcuts

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