whitelist

package
v1.0.13 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2020 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Version is version of CclaWhitelistRequest
	Version = "v1"
	// StatusPending is status of CclaWhitelistRequest
	StatusPending = "pending"
)

Variables

View Source
var (
	ErrCclaWhitelistRequestAlreadyExists = errors.New("CCLA whiltelist request already exist")
)

errors

Functions

func Configure

func Configure(api *operations.ClaAPI, service service, sessionStore *dynastore.Store, signatureService signatures.SignatureService, eventsService events.Service)

Configure setups handlers on api with service

func NewRepository

func NewRepository(awsSession *session.Session, stage string) repository

NewRepository creates a new instance of the whitelist service

func NewService

func NewService(repo Repository, userRepo users.UserRepository, companyRepo company.CompanyRepository, projectRepo project.ProjectRepository, httpClient *http.Client) service

NewService creates a new whitelist service

Types

type CclaWhitelistRequest added in v1.0.4

type CclaWhitelistRequest struct {
	RequestID          string   `dynamodbav:"request_id"`
	RequestStatus      string   `dynamodbav:"request_status"`
	CompanyID          string   `dynamodbav:"company_id"`
	CompanyName        string   `dynamodbav:"company_name"`
	ProjectID          string   `dynamodbav:"project_id"`
	ProjectName        string   `dynamodbav:"project_name"`
	UserID             string   `dynamodbav:"user_id"`
	UserEmails         []string `dynamodbav:"user_emails"`
	UserName           string   `dynamodbav:"user_name"`
	UserGithubID       string   `dynamodbav:"user_github_id"`
	UserGithubUsername string   `dynamodbav:"user_github_username"`
	DateCreated        string   `dynamodbav:"date_created"`
	DateModified       string   `dynamodbav:"date_modified"`
	Version            string   `dynamodbav:"version"`
}

CclaWhitelistRequest data model

type Repository

type Repository interface {
	AddCclaWhitelistRequest(company *models.Company, project *models.Project, user *models.User) (string, error)
	DeleteCclaWhitelistRequest(requestID string) error
	ListCclaWhitelistRequest(companyID string, projectID *string, userID *string) (*models.CclaWhitelistRequestList, error)
}

Repository interface defines the functions for the whitelist service

Jump to

Keyboard shortcuts

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