config

package
v0.0.0-...-fc9dd9a Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AWS

type AWS struct {
	Region string `json:"region"`
}

AWS model

type Auth0

type Auth0 struct {
	Domain        string `json:"auth0-domain"`
	ClientID      string `json:"auth0-clientId"`
	UsernameClaim string `json:"auth0-username-claim"`
	Algorithm     string `json:"auth0-algorithm"`
}

Auth0 model

type Auth0Platform

type Auth0Platform struct {
	ClientID     string `json:"auth0-clientId"`
	ClientSecret string `json:"auth0-clientSecret"`
	Audience     string `json:"audience"`
	URL          string `json:"url"`
}

Auth0Platform model

type Config

type Config struct {
	// Auth0
	Auth0 Auth0 `json:"auth0"`

	// Auth0Platform config
	Auth0Platform Auth0Platform `json:"auth0_platform"`

	// APIGatewayURL is the API gateway URL - old variable which is set by the old cla-auth0-gateway SSM key
	APIGatewayURL string `json:"api_gateway_url"`
	// PlatformAPIGatewayURL is the platform API gateway URL
	PlatformAPIGatewayURL string `json:"platform_api_gateway_url"`

	// EnableCLAServiceForParent is a configuration flag to indicate if we should set the enable_services=[CLA] attribute on the parent project object in the project service when a child project is associated with a CLA group. This determines the v2 project console experience/behavior."
	EnableCLAServiceForParent bool `json:"enable_cla_service_for_parent"`

	// SignatureQueryDefault is a flag to indicate how a default signature query should return data - show only 'active' signatures or 'all' signatures when no other query signed/approved params are provided
	SignatureQueryDefault string `json:"signature_query_default"`
	// SignatureQueryDefaultValue the default value for the SignatureQueryDefault configuration value
	SignatureQueryDefaultValue string `json:"signature_query_default_value"`

	// Docraptor
	Docraptor Docraptor `json:"docraptor"`

	// AWS
	AWS AWS `json:"aws"`

	// GitHub Application
	GitHub GitHub `json:"github"`

	// Gitlab Application
	Gitlab Gitlab `json:"gitlab"`

	// Dynamo Session Store
	SessionStoreTableName string `json:"sessionStoreTableName"`

	// Sender Email Address
	SenderEmailAddress string `json:"senderEmailAddress"`

	AllowedOriginsCommaSeparated string   `json:"allowedOriginsCommaSeparated"`
	AllowedOrigins               []string `json:"-"`

	CorporateConsoleURL   string `json:"corporateConsoleURL"`
	CorporateConsoleV1URL string `json:"corporateConsoleV1URL"`
	CorporateConsoleV2URL string `json:"corporateConsoleV2URL"`

	CLAContributorv2Base string `json:"cla-contributor-v2-base"`
	ClaAPIV4Base         string `json:"cla_api_v4_base"`

	// SNSEventTopic the topic ARN for events
	SNSEventTopicARN string `json:"snsEventTopicARN"`

	// S3 bucket to store signatures
	SignatureFilesBucket string `json:"signatureFilesBucket"`

	// LF Group
	LFGroup LFGroup `json:"lf_group"`

	// CLAV1ApiURL is api url of v1. it is used in v2 sign service
	ClaV1ApiURL string `json:"cla_v1_api_url"`

	// CLALandingPage
	CLALandingPage string `json:"cla_landing_page"`

	// CLALogoURL easyCLA bot LOGO url
	CLALogoURL string `json:"cla_logo_url"`

	// AcsAPIKey is api key of the acs
	AcsAPIKey string `json:"acs_api_key"`

	// LFXPortalURL is url of the LFX UI for the particular environment
	LFXPortalURL string `json:"lfx_portal_url"`

	// MetricsReport has the transport config to send the metrics data
	MetricsReport MetricsReport `json:"metrics_report"`

	// DocuSignPrivateKey is the private key for the DocuSign API
	DocuSignPrivateKey string `json:"docuSignPrivateKey"`
}

Config data model

func GetConfig

func GetConfig() Config

GetConfig returns the current EasyCLA configuration

func LoadConfig

func LoadConfig(configFilePath string, awsSession *session.Session, awsStage string) (Config, error)

LoadConfig loads the configuration

type Docraptor

type Docraptor struct {
	APIKey   string `json:"apiKey"`
	TestMode bool   `json:"testMode"`
}

Docraptor model

type GitHub

type GitHub struct {
	ClientID                       string `json:"clientId"`
	ClientSecret                   string `json:"clientSecret"`
	AccessToken                    string `json:"accessToken"`
	AppID                          int    `json:"app_id"`
	AppPrivateKey                  string `json:"app_private_key"`
	TestOrganization               string `json:"test_organization"`
	TestOrganizationInstallationID string `json:"test_organization_installation_id"`
	TestRepository                 string `json:"test_repository"`
	TestRepositoryID               string `json:"test_repository_id"`
}

GitHub model

type Gitlab

type Gitlab struct {
	AppClientID     string `json:"app_client_id"`
	AppClientSecret string `json:"app_client_secret"`
	AppPrivateKey   string `json:"app_client_private_key"`
	RedirectURI     string `json:"app_redirect_uri"`
	WebHookURI      string `json:"app_web_hook_uri"`
}

Gitlab config data model

type LFGroup

type LFGroup struct {
	ClientURL    string `json:"client_url"`
	ClientID     string `json:"client_id"`
	ClientSecret string `json:"client_secret"`
	RefreshToken string `json:"refresh_token"`
}

LFGroup contains LF LDAP group access information

type MetricsReport

type MetricsReport struct {
	AwsSQSRegion   string `json:"aws_sqs_region"`
	AwsSQSQueueURL string `json:"aws_sqs_queue_url"`
	Enabled        bool   `json:"metrics_reporting_enabled"`
}

MetricsReport keeps the config needed to send the metrics data report

Jump to

Keyboard shortcuts

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