Documentation ¶
Overview ¶
Package model maps database models to API models for REST requests to the server.
Adding Models ¶
Each model is kept in the model package of the REST v2 API in its own file. To create a new model, define a struct containing all of the fields that it will return and implement its two main methods BuildFromService and ToService. Be sure to include struct tags to define the names the fields will have when serialized to JSON.
Note that although it's generally recommended to implement some BuildFromService and ToService methods to facilitate conversion between the REST and service models, it's not necessary to implement the Model interface's exact method definition (i.e. passing in interface{} and returning interface{}). The Model interface is only necessary for a few special cases (e.g. reflection in admin settings); for most REST models, it's much preferred to pass in the concrete service model type and return the concrete service model type rather than pass around interface{} and then type cast it into its expected type.
Guidelines for Creating Models ¶
Include as much data as a user is likely to want when inspecting this resource. This is likely to be more information than seems directly needed, but there is little penalty to its inclusion.
Model Methods ¶
The Model type is an interface with two methods.
BuildFromService(in interface{}) error
BuildFromService fetches all needed data from the passed in object and sets them on the model. BuildFromService may sometimes be called multiple times with different types that all contain data to build up the model object. In this case, a type switch is likely necessary to determine what has been passed in.
ToService()(interface{}, error)
ToService creates an as-complete-as-possible version of the service layer's version of this model. For example, if this is is a REST v2 Task model, the ToService method creates a service layer Task and sets all of the fields it is able to and returns it.
Index ¶
- Constants
- func APIIssueLinkToService(m APIIssueLink) *annotations.IssueLink
- func APIMetadataLinkToService(m APIMetadataLink) *annotations.MetadataLink
- func APIMetadataLinksToService(t []*APIMetadataLink) []annotations.MetadataLink
- func APIModuleToService(m APIModule) *commitqueue.Module
- func APINoteToService(m *APINote) *annotations.Note
- func APISourceToService(m *APISource) *annotations.Source
- func APITaskAnnotationToService(m APITaskAnnotation) *annotations.TaskAnnotation
- func ArrstringArrstring(t []string) []string
- func BoolBool(in bool) bool
- func BuildIssueLinks(t []APIIssueLink) []annotations.IssueLink
- func FromTimePtr(t *time.Time) (time.Time, error)
- func GetJiraTicketFromURL(jiraURL string) (*thirdparty.JiraTicket, error)
- func MarshalAPIDuration(b APIDuration) graphql.Marshaler
- func ParseTime(tval string) (time.Time, error)
- func StringPtrString(in *string) string
- func StringString(in string) string
- func StringStringPtr(in string) *string
- func ToTimePtr(t time.Time) *time.Time
- func UpdateUserSettings(ctx context.Context, usr *user.DBUser, userSettings APIUserSettings) (*user.UserSettings, error)
- func ValidateIssues(issues []APIIssueLink) error
- type APIAWSConfig
- type APIAWSPodConfig
- type APIAWSVPCConfig
- type APIAbortInfo
- type APIAdminEvent
- type APIAdminSettings
- type APIAmboyConfig
- type APIAmboyDBConfig
- type APIAmboyNamedQueueConfig
- type APIAmboyRetryConfig
- type APIAuthConfig
- type APIAuthUser
- type APIBanner
- type APIBaseTaskInfo
- type APIBetaFeatures
- type APIBootstrapSettings
- type APIBucketConfig
- type APIBucketsConfig
- type APIBuild
- type APIBuildBaronSettings
- type APICLIUpdate
- type APICedarConfig
- type APIChildPatchAlias
- type APIClientBinary
- type APIClientConfig
- type APICloudProviders
- type APICommitQueue
- type APICommitQueueConfig
- type APICommitQueueItem
- type APICommitQueueItemAuthor
- type APICommitQueueParams
- type APICommitQueuePosition
- type APIContainerOptions
- type APIContainerPool
- type APIContainerPoolsConfig
- type APIContainerResourceInfo
- type APIContainerResources
- type APIContainerSecret
- type APICreateHost
- type APICreatePod
- type APICreatePodResponse
- type APIDBUser
- type APIDependency
- type APIDispatcherSettings
- type APIDisplayTask
- type APIDistro
- type APIDockerConfig
- type APIDuration
- type APIEC2Key
- type APIECSCapacityProvider
- type APIECSClusterConfig
- type APIECSConfig
- type APIEmail
- type APIEntry
- type APIEnvVar
- type APIEventStats
- type APIExpansion
- type APIExternalLink
- type APIFailingCommand
- type APIFeedbackSubmission
- type APIFile
- type APIFinderSettings
- type APIGeneratedTaskInfo
- type APIGitHubCheckRunConfig
- type APIGitHubDynamicTokenPermissionGroup
- type APIGitTag
- type APIGithubAppAuth
- type APIGithubAuthConfig
- type APIGithubCheckSubscriber
- type APIGithubMergeSubscriber
- type APIGithubPRSubscriber
- type APIGithubUser
- type APIHomeVolumeSettings
- type APIHost
- type APIHostAllocatorSettings
- type APIHostCreateDetail
- type APIHostInitConfig
- type APIHostIsUpOptions
- type APIHostJasperConfig
- type APIHostParams
- type APIHostProcess
- type APIHostProvisioningOptions
- type APIHostScript
- type APIHostStatsByDistro
- type APIIceCreamSettings
- type APIImage
- type APIImageEvent
- type APIImageEventEntry
- type APIIssueLink
- type APIJIRAIssueSubscriber
- type APIJIRANotificationsConfig
- type APIJIRANotificationsProject
- type APIJiraBasicAuth
- type APIJiraConfig
- type APIJiraOAuth1
- type APIKanopyAuthConfig
- type APILogBuffering
- type APILoggerConfig
- type APIMetadataLink
- type APIModule
- type APIModulePatch
- type APIMultiAuthConfig
- type APINaiveAuthConfig
- type APINewRelicConfig
- type APINote
- type APINotificationPreferences
- type APINotifyConfig
- type APINumTasksToFinalize
- type APIOSInfo
- type APIOffboardUserResults
- type APIOktaConfig
- type APIOomTrackerInfo
- type APIOwnerRepo
- type APIPRInfo
- type APIPackage
- type APIParameter
- type APIParameterInfo
- type APIParameterStoreConfig
- type APIParserProjectS3Config
- type APIParsleyFilter
- type APIParsleySettings
- type APIPatch
- type APIPatchArgs
- type APIPatchTriggerDefinition
- type APIPeriodicBuildDefinition
- type APIPermission
- type APIPermissions
- type APIPersistentDNSConfig
- type APIPlannerSettings
- type APIPod
- type APIPodArch
- type APIPodLifecycleConfig
- type APIPodOS
- type APIPodResourceInfo
- type APIPodSecret
- type APIPodStatus
- type APIPodTaskContainerCreationOptions
- type APIPodTimeInfo
- type APIPodType
- type APIPodWindowsVersion
- type APIPreconditionScript
- type APIProjectAlias
- type APIProjectBanner
- type APIProjectCreationConfig
- type APIProjectEvent
- type APIProjectEventSettings
- type APIProjectRef
- type APIProjectSettings
- type APIProjectVars
- type APIProvisionOptions
- type APIPubKey
- type APIQuestionAnswer
- type APIRawModule
- type APIRawPatch
- type APIRecentTaskStats
- type APIRecentTaskStatsList
- type APIRepoTrackerConfig
- type APIRepositoryCredentials
- type APIRepositoryErrorDetails
- type APIResourceLimits
- type APIRuntimeEnvironmentsConfig
- type APIS3Credentials
- type APISESConfig
- type APISSHKeyPair
- type APISchedulerConfig
- type APISecretsManagerConfig
- type APISelector
- type APIServiceFlags
- type APISlack
- type APISlackAttachment
- type APISlackAttachmentField
- type APISlackConfig
- type APISlackOptions
- type APISleepScheduleConfig
- type APISource
- type APISpawnHostConfig
- type APISpawnHostModify
- type APISplunkConfig
- type APISplunkConnectionInfo
- type APIStat
- type APIStatList
- type APIStepbackInfo
- type APISubnet
- type APISubscriber
- type APISubscription
- type APISyncAtEndOptions
- type APITask
- func (at *APITask) BuildFromService(ctx context.Context, t *task.Task, args *APITaskArgs) error
- func (at *APITask) BuildPreviousExecutions(ctx context.Context, tasks []task.Task, logURL, parsleyURL string) error
- func (at *APITask) GetAMI(ctx context.Context) error
- func (at *APITask) GetProjectIdentifier()
- func (at *APITask) ToService() (*task.Task, error)
- type APITaskAnnotation
- type APITaskAnnotationSettings
- type APITaskArgs
- type APITaskCache
- type APITaskLimitsConfig
- type APITaskQueueItem
- type APITaskReliability
- type APITaskRuntimeInfo
- type APITaskSpecifier
- type APITaskStats
- type APITaskSyncOptions
- type APITest
- type APIToolchain
- type APITracerSettings
- type APITriggerConfig
- type APITriggerDefinition
- type APIUIConfig
- type APIUiV2URL
- type APIUseSpruceOptions
- type APIUserSettings
- type APIVariantTasks
- type APIVersion
- type APIVersions
- type APIVolume
- type APIVolumeModify
- type APIWebHook
- type APIWebhookHeader
- type APIWebhookSubscriber
- type APIWorkstationConfig
- type APIWorkstationSetupCommand
- type APIapiConfig
- type AliasedType
- type ApiTaskEndDetail
- type BuildList
- type ChildPatch
- type CompareTasksRequest
- type CompareTasksResponse
- type DefinitionInfo
- type DistroInfo
- type DownstreamTasks
- type FileDiff
- type GetProjectTaskExecutionReq
- type GithubCommentCqData
- type HostAPIEventData
- type HostAPIEventLogEntry
- type HostListResults
- type HostRequestOptions
- type LogLinks
- type MockEmbedded
- type MockLayerOne
- type MockLayerTwo
- type MockModel
- type MockScalars
- type MockSubStruct
- type MockTypes
- type Model
- type PodAPIEventData
- type PodAPIEventLogEntry
- type ProjectTaskExecutionResp
- type RestartResponse
- type StartAtKey
- type StructWithAliased
- type TaskAPIEventLogEntry
- type TaskEventData
- type TaskInfo
- type TestLogs
- type UIProjectFields
- type VariantTask
- type VersionVariantData
- type VolumeModifyOptions
- type VolumePostRequest
Constants ¶
const ( TaskLogLinkFormat = "%s/task_log_raw/%s/%d?type=%s" ParsleyTaskLogLinkFormat = "%s/evergreen/%s/%d/%s" EventLogLinkFormat = "%s/event_log/task/%s" )
const ( // APITimeFormat defines ISO-8601 UTC with 3 fractional seconds behind a dot // specified by the API spec document. APITimeFormat = "\"2006-01-02T15:04:05.000Z\"" )
Variables ¶
This section is empty.
Functions ¶
func APIIssueLinkToService ¶
func APIIssueLinkToService(m APIIssueLink) *annotations.IssueLink
APIIssueLinkToService takes the APIIssueLink REST struct and returns the DB struct *annotations.IssueLink with the corresponding fields populated
func APIMetadataLinkToService ¶
func APIMetadataLinkToService(m APIMetadataLink) *annotations.MetadataLink
APIMetadataLinkToService takes the APIMetadataLink REST struct and returns the DB struct *annotations.MetadataLink with the corresponding fields populated
func APIMetadataLinksToService ¶
func APIMetadataLinksToService(t []*APIMetadataLink) []annotations.MetadataLink
APIMetadataLinksToService converts a slice of APIMetadataLink to a slice of annotations.MetadataLink
func APIModuleToService ¶
func APIModuleToService(m APIModule) *commitqueue.Module
APIModuleToService takes the APIModule REST struct and returns the DB struct *commitqueue.Module with the corresponding fields populated
func APINoteToService ¶
func APINoteToService(m *APINote) *annotations.Note
APINoteToService takes the APINote REST struct and returns the DB struct *annotations.Note with the corresponding fields populated
func APISourceToService ¶
func APISourceToService(m *APISource) *annotations.Source
APISourceToService takes the APISource REST struct and returns the DB struct *annotations.Source with the corresponding fields populated
func APITaskAnnotationToService ¶
func APITaskAnnotationToService(m APITaskAnnotation) *annotations.TaskAnnotation
APITaskAnnotationToService takes the APITaskAnnotation REST struct and returns the DB struct *annotations.TaskAnnotation with the corresponding fields populated
func ArrstringArrstring ¶
func BuildIssueLinks ¶
func BuildIssueLinks(t []APIIssueLink) []annotations.IssueLink
BuildIssueLinks converts a slice of APIIssueLink to a slice of annotations.IssueLink
func GetJiraTicketFromURL ¶
func GetJiraTicketFromURL(jiraURL string) (*thirdparty.JiraTicket, error)
func MarshalAPIDuration ¶
func MarshalAPIDuration(b APIDuration) graphql.Marshaler
func StringPtrString ¶
func StringString ¶
func StringStringPtr ¶
func UpdateUserSettings ¶
func UpdateUserSettings(ctx context.Context, usr *user.DBUser, userSettings APIUserSettings) (*user.UserSettings, error)
UpdateUserSettings Returns an updated version of the user settings struct
func ValidateIssues ¶
func ValidateIssues(issues []APIIssueLink) error
Types ¶
type APIAWSConfig ¶
type APIAWSConfig struct { EC2Keys []APIEC2Key `json:"ec2_keys"` Subnets []APISubnet `json:"subnets"` TaskSync *APIS3Credentials `json:"task_sync"` TaskSyncRead *APIS3Credentials `json:"task_sync_read"` ParserProject *APIParserProjectS3Config `json:"parser_project"` PersistentDNS *APIPersistentDNSConfig `json:"persistent_dns"` DefaultSecurityGroup *string `json:"default_security_group"` AllowedInstanceTypes []*string `json:"allowed_instance_types"` AllowedRegions []*string `json:"allowed_regions"` MaxVolumeSizePerUser *int `json:"max_volume_size"` Pod *APIAWSPodConfig `json:"pod"` ParameterStore *APIParameterStoreConfig `json:"parameter_store"` }
func (*APIAWSConfig) BuildFromService ¶
func (a *APIAWSConfig) BuildFromService(h interface{}) error
func (*APIAWSConfig) ToService ¶
func (a *APIAWSConfig) ToService() (interface{}, error)
type APIAWSPodConfig ¶
type APIAWSPodConfig struct { Role *string `json:"role"` Region *string `json:"region"` ECS *APIECSConfig `json:"ecs"` SecretsManager *APISecretsManagerConfig `json:"secrets_manager"` }
APIAWSPodConfig represents configuration options for pods running in AWS.
func (*APIAWSPodConfig) BuildFromService ¶
func (a *APIAWSPodConfig) BuildFromService(conf evergreen.AWSPodConfig)
func (*APIAWSPodConfig) ToService ¶
func (a *APIAWSPodConfig) ToService() (*evergreen.AWSPodConfig, error)
type APIAWSVPCConfig ¶
type APIAWSVPCConfig struct { Subnets []string `json:"subnets,omitempty"` SecurityGroups []string `json:"security_groups,omitempty"` }
APIAWSVPCConfig represents configuration options for tasks in ECS using AWSVPC networking.
func (*APIAWSVPCConfig) BuildFromService ¶
func (a *APIAWSVPCConfig) BuildFromService(conf evergreen.AWSVPCConfig)
func (*APIAWSVPCConfig) ToService ¶
func (a *APIAWSVPCConfig) ToService() evergreen.AWSVPCConfig
type APIAbortInfo ¶
type APIAdminEvent ¶
type APIAdminEvent struct { Timestamp *time.Time `json:"ts"` User string `json:"user"` Section string `json:"section"` Before Model `json:"before"` After Model `json:"after"` Guid string `json:"guid"` }
func (*APIAdminEvent) BuildFromService ¶
func (e *APIAdminEvent) BuildFromService(h interface{}) error
func (*APIAdminEvent) ToService ¶
func (e *APIAdminEvent) ToService() (interface{}, error)
type APIAdminSettings ¶
type APIAdminSettings struct { Amboy *APIAmboyConfig `json:"amboy,omitempty"` AmboyDB *APIAmboyDBConfig `json:"amboy_db,omitempty"` Api *APIapiConfig `json:"api,omitempty"` AWSInstanceRole *string `json:"aws_instance_role,omitempty"` AuthConfig *APIAuthConfig `json:"auth,omitempty"` Banner *string `json:"banner,omitempty"` BannerTheme *string `json:"banner_theme,omitempty"` Buckets *APIBucketsConfig `json:"buckets,omitempty"` Cedar *APICedarConfig `json:"cedar,omitempty"` CommitQueue *APICommitQueueConfig `json:"commit_queue,omitempty"` ConfigDir *string `json:"configdir,omitempty"` ContainerPools *APIContainerPoolsConfig `json:"container_pools,omitempty"` DomainName *string `json:"domain_name,omitempty"` Expansions map[string]string `json:"expansions,omitempty"` GithubPRCreatorOrg *string `json:"github_pr_creator_org,omitempty"` GithubOrgs []string `json:"github_orgs,omitempty"` DisabledGQLQueries []string `json:"disabled_gql_queries"` HostInit *APIHostInitConfig `json:"hostinit,omitempty"` HostJasper *APIHostJasperConfig `json:"host_jasper,omitempty"` Jira *APIJiraConfig `json:"jira,omitempty"` JIRANotifications *APIJIRANotificationsConfig `json:"jira_notifications,omitempty"` KanopySSHKeyPath *string `json:"kanopy_ssh_key_path,omitempty"` LoggerConfig *APILoggerConfig `json:"logger_config,omitempty"` LogPath *string `json:"log_path,omitempty"` NewRelic *APINewRelicConfig `json:"newrelic,omitempty"` Notify *APINotifyConfig `json:"notify,omitempty"` Plugins map[string]map[string]interface{} `json:"plugins,omitempty"` PodLifecycle *APIPodLifecycleConfig `json:"pod_lifecycle,omitempty"` PprofPort *string `json:"pprof_port,omitempty"` ProjectCreation *APIProjectCreationConfig `json:"project_creation,omitempty"` Providers *APICloudProviders `json:"providers,omitempty"` RepoTracker *APIRepoTrackerConfig `json:"repotracker,omitempty"` RuntimeEnvironments *APIRuntimeEnvironmentsConfig `json:"runtime_environments,omitempty"` Scheduler *APISchedulerConfig `json:"scheduler,omitempty"` ServiceFlags *APIServiceFlags `json:"service_flags,omitempty"` Slack *APISlackConfig `json:"slack,omitempty"` SleepSchedule *APISleepScheduleConfig `json:"sleep_schedule,omitempty"` SSHKeyDirectory *string `json:"ssh_key_directory,omitempty"` SSHKeyPairs []APISSHKeyPair `json:"ssh_key_pairs,omitempty"` Splunk *APISplunkConfig `json:"splunk,omitempty"` TaskLimits *APITaskLimitsConfig `json:"task_limits,omitempty"` Triggers *APITriggerConfig `json:"triggers,omitempty"` Ui *APIUIConfig `json:"ui,omitempty"` Spawnhost *APISpawnHostConfig `json:"spawnhost,omitempty"` Tracer *APITracerSettings `json:"tracer,omitempty"` GitHubCheckRun *APIGitHubCheckRunConfig `json:"github_check_run,omitempty"` ShutdownWaitSeconds *int `json:"shutdown_wait_seconds,omitempty"` }
APIAdminSettings is the structure of a response to the admin route
func NewConfigModel ¶
func NewConfigModel() *APIAdminSettings
func (*APIAdminSettings) BuildFromService ¶
func (as *APIAdminSettings) BuildFromService(h interface{}) error
BuildFromService builds a model from the service layer
func (*APIAdminSettings) ToService ¶
func (as *APIAdminSettings) ToService() (interface{}, error)
ToService returns a service model from an API model
type APIAmboyConfig ¶
type APIAmboyConfig struct { Name *string `json:"name"` SingleName *string `json:"single_name"` PoolSizeLocal int `json:"pool_size_local"` PoolSizeRemote int `json:"pool_size_remote"` LocalStorage int `json:"local_storage_size"` GroupDefaultWorkers int `json:"group_default_workers"` GroupBackgroundCreateFrequencyMinutes int `json:"group_background_create_frequency"` GroupPruneFrequencyMinutes int `json:"group_prune_frequency"` GroupTTLMinutes int `json:"group_ttl"` LockTimeoutMinutes int `json:"lock_timeout_minutes"` SampleSize int `json:"sample_size"` Retry APIAmboyRetryConfig `json:"retry,omitempty"` NamedQueues []APIAmboyNamedQueueConfig `json:"named_queues,omitempty"` }
func (*APIAmboyConfig) BuildFromService ¶
func (a *APIAmboyConfig) BuildFromService(h interface{}) error
func (*APIAmboyConfig) ToService ¶
func (a *APIAmboyConfig) ToService() (interface{}, error)
type APIAmboyDBConfig ¶
func (*APIAmboyDBConfig) BuildFromService ¶
func (a *APIAmboyDBConfig) BuildFromService(h interface{}) error
func (*APIAmboyDBConfig) ToService ¶
func (a *APIAmboyDBConfig) ToService() (interface{}, error)
type APIAmboyNamedQueueConfig ¶
type APIAmboyNamedQueueConfig struct { Name *string `json:"name"` Regexp *string `json:"regexp"` NumWorkers int `json:"num_workers,omitempty"` SampleSize int `json:"sample_size,omitempty"` LockTimeoutSeconds int `json:"lock_timeout_seconds,omitempty"` }
APIAmboyNamedQueueConfig is the model for named Amboy queue settings.
func (*APIAmboyNamedQueueConfig) BuildFromService ¶
func (a *APIAmboyNamedQueueConfig) BuildFromService(h evergreen.AmboyNamedQueueConfig)
func (*APIAmboyNamedQueueConfig) ToService ¶
func (a *APIAmboyNamedQueueConfig) ToService() evergreen.AmboyNamedQueueConfig
type APIAmboyRetryConfig ¶
type APIAmboyRetryConfig struct { NumWorkers int `json:"num_workers,omitempty"` MaxCapacity int `json:"max_capacity,omitempty"` MaxRetryAttempts int `json:"max_retry_attempts,omitempty"` MaxRetryTimeSeconds int `json:"max_retry_time_seconds,omitempty"` RetryBackoffSeconds int `json:"retry_backoff_seconds,omitempty"` StaleRetryingMonitorIntervalSeconds int `json:"stale_retrying_monitor_interval_seconds,omitempty"` }
func (*APIAmboyRetryConfig) BuildFromService ¶
func (a *APIAmboyRetryConfig) BuildFromService(h interface{}) error
func (*APIAmboyRetryConfig) ToService ¶
func (a *APIAmboyRetryConfig) ToService() (interface{}, error)
type APIAuthConfig ¶
type APIAuthConfig struct { Okta *APIOktaConfig `json:"okta"` Naive *APINaiveAuthConfig `json:"naive"` Github *APIGithubAuthConfig `json:"github"` Multi *APIMultiAuthConfig `json:"multi"` Kanopy *APIKanopyAuthConfig `json:"kanopy"` PreferredType *string `json:"preferred_type"` BackgroundReauthMinutes int `json:"background_reauth_minutes"` AllowServiceUsers bool `json:"allow_service_users"` }
func (*APIAuthConfig) BuildFromService ¶
func (a *APIAuthConfig) BuildFromService(h interface{}) error
func (*APIAuthConfig) ToService ¶
func (a *APIAuthConfig) ToService() (interface{}, error)
type APIAuthUser ¶
type APIAuthUser struct { Username *string `json:"username"` DisplayName *string `json:"display_name"` Password *string `json:"password"` Email *string `json:"email"` }
func (*APIAuthUser) BuildFromService ¶
func (a *APIAuthUser) BuildFromService(h interface{}) error
func (*APIAuthUser) ToService ¶
func (a *APIAuthUser) ToService() (interface{}, error)
type APIBanner ¶
APIBanner is a public structure representing the banner part of the admin settings
func (*APIBanner) BuildFromService ¶
BuildFromService builds a model from the service layer
type APIBaseTaskInfo ¶
type APIBetaFeatures ¶
type APIBetaFeatures struct {
SpruceWaterfallEnabled bool `json:"spruce_waterfall_enabled"`
}
APIBetaFeatures is the API model for BetaFeatures.
func (*APIBetaFeatures) BuildFromService ¶
func (a *APIBetaFeatures) BuildFromService(b evergreen.BetaFeatures)
BuildFromService converts from service level BetaFeatures to APIBetaFeatures.
func (*APIBetaFeatures) ToService ¶
func (a *APIBetaFeatures) ToService() evergreen.BetaFeatures
ToService returns a service layer BetaFeatures using the data from APIBetaFeatures.
type APIBootstrapSettings ¶
type APIBootstrapSettings struct { Method *string `json:"method"` Communication *string `json:"communication"` ClientDir *string `json:"client_dir"` JasperBinaryDir *string `json:"jasper_binary_dir"` JasperCredentialsPath *string `json:"jasper_credentials_path"` ServiceUser *string `json:"service_user"` ShellPath *string `json:"shell_path"` RootDir *string `json:"root_dir"` Env []APIEnvVar `json:"env"` ResourceLimits APIResourceLimits `json:"resource_limits"` PreconditionScripts []APIPreconditionScript `json:"precondition_scripts"` }
func (*APIBootstrapSettings) BuildFromService ¶
func (s *APIBootstrapSettings) BuildFromService(settings distro.BootstrapSettings)
BuildFromService converts from service level distro.BootstrapSettings to an APIBootstrapSettings.
func (*APIBootstrapSettings) ToService ¶
func (s *APIBootstrapSettings) ToService() distro.BootstrapSettings
ToService returns a service layer distro.BootstrapSettings using the data from APIBootstrapSettings.
type APIBucketConfig ¶
type APIBucketsConfig ¶
type APIBucketsConfig struct { LogBucket APIBucketConfig `json:"log_bucket"` Credentials APIS3Credentials `json:"credentials"` }
func (*APIBucketsConfig) BuildFromService ¶
func (a *APIBucketsConfig) BuildFromService(h interface{}) error
func (*APIBucketsConfig) ToService ¶
func (a *APIBucketsConfig) ToService() (interface{}, error)
type APIBuild ¶
type APIBuild struct { Id *string `json:"_id"` // The identifier of the project this build represents ProjectId *string `json:"project_id"` ProjectIdentifier *string `json:"project_identifier"` // Time at which build was created CreateTime *time.Time `json:"create_time"` // Time at which build started running tasks StartTime *time.Time `json:"start_time"` // Time at which build finished running all tasks FinishTime *time.Time `json:"finish_time"` // The version this build is running tasks for Version *string `json:"version"` // Hash of the revision on which this build is running Revision *string `json:"git_hash"` // Build distro and architecture information BuildVariant *string `json:"build_variant"` // The status of the build (possible values are "created", "started", "success", or "failed") Status *string `json:"status"` // Whether this build was manually initiated Activated bool `json:"activated"` // Who initiated the build ActivatedBy *string `json:"activated_by"` // When the build was initiated ActivatedTime *time.Time `json:"activated_time"` // Incrementing counter of project's builds RevisionOrderNumber int `json:"order"` // Contains a subset of information about tasks for the build; this is not // provided/accurate for most routes (get versions for project is an // exception). TaskCache []APITaskCache `json:"task_cache,omitempty"` // Tasks is the build's task cache with just the names Tasks []string `json:"tasks"` // List of tags defined for the build variant, if any Tags []*string `json:"tags,omitempty"` // How long the build took to complete all tasks TimeTaken APIDuration `json:"time_taken_ms"` // Displayed title of the build showing version and variant running DisplayName *string `json:"display_name"` // Predicted makespan by the scheduler prior to execution PredictedMakespan APIDuration `json:"predicted_makespan_ms"` // Actual makespan measured during execution ActualMakespan APIDuration `json:"actual_makespan_ms"` // The source of the patch, a commit or a patch Origin *string `json:"origin"` // Contains aggregated data about the statuses of tasks in this build. The // keys of this object are statuses and the values are the number of tasks // within this build in that status. Note that this field provides data that // you can get yourself by querying tasks for this build. StatusCounts task.TaskStatusCount `json:"status_counts,omitempty"` // Some routes will return information about the variant as defined in the // project. Does not expand expansions; they will be returned as written in // the project yaml (i.e. ${syntax}) DefinitionInfo DefinitionInfo `json:"definition_info"` }
APIBuild is the model to be returned by the API whenever builds are fetched.
func (*APIBuild) BuildFromService ¶
func (apiBuild *APIBuild) BuildFromService(v build.Build, pp *model.ParserProject)
BuildFromService converts from service level structs to an APIBuild. APIBuild.ProjectId is set in the route builder's Execute method. If ParserProject isn't nil, include info from project (not applicable to matrix builds).
func (*APIBuild) SetTaskCache ¶
type APIBuildBaronSettings ¶
type APIBuildBaronSettings struct { // Jira project where tickets should be created. TicketCreateProject *string `bson:"ticket_create_project" json:"ticket_create_project"` // Type of ticket to create. TicketCreateIssueType *string `bson:"ticket_create_issue_type" json:"ticket_create_issue_type"` // Jira project to search for tickets. TicketSearchProjects []*string `bson:"ticket_search_projects" json:"ticket_search_projects"` BFSuggestionServer *string `bson:"bf_suggestion_server" json:"bf_suggestion_server"` BFSuggestionUsername *string `bson:"bf_suggestion_username" json:"bf_suggestion_username"` BFSuggestionPassword *string `bson:"bf_suggestion_password" json:"bf_suggestion_password"` BFSuggestionTimeoutSecs *int `bson:"bf_suggestion_timeout_secs" json:"bf_suggestion_timeout_secs"` BFSuggestionFeaturesURL *string `bson:"bf_suggestion_features_url" json:"bf_suggestion_features_url"` }
func (*APIBuildBaronSettings) BuildFromService ¶
func (bb *APIBuildBaronSettings) BuildFromService(def evergreen.BuildBaronSettings)
func (*APIBuildBaronSettings) ToService ¶
func (bb *APIBuildBaronSettings) ToService() evergreen.BuildBaronSettings
type APICLIUpdate ¶
type APICLIUpdate struct { ClientConfig APIClientConfig `json:"client_config"` IgnoreUpdate bool `json:"ignore_update"` }
func (*APICLIUpdate) BuildFromService ¶
func (a *APICLIUpdate) BuildFromService(c evergreen.ClientConfig)
type APICedarConfig ¶
type APICedarConfig struct { BaseURL *string `json:"base_url"` GRPCBaseURL *string `json:"grpc_base_url"` RPCPort *string `json:"rpc_port"` User *string `json:"user"` APIKey *string `json:"api_key"` SendToCedarDisabled *bool `json:"send_to_cedar_disabled"` SPSURL *string `json:"sps_url"` SendRatioSPS *int `json:"send_ratio_sps"` }
func (*APICedarConfig) BuildFromService ¶
func (a *APICedarConfig) BuildFromService(h interface{}) error
func (*APICedarConfig) ToService ¶
func (a *APICedarConfig) ToService() (interface{}, error)
type APIChildPatchAlias ¶
type APIClientBinary ¶
type APIClientBinary struct { Arch *string `json:"arch"` OS *string `json:"os"` URL *string `json:"url"` DisplayName *string `json:"display_name"` }
func (*APIClientBinary) BuildFromService ¶
func (a *APIClientBinary) BuildFromService(b evergreen.ClientBinary)
func (*APIClientBinary) ToService ¶
func (a *APIClientBinary) ToService() evergreen.ClientBinary
type APIClientConfig ¶
type APIClientConfig struct { ClientBinaries []APIClientBinary `json:"client_binaries,omitempty"` S3ClientBinaries []APIClientBinary `json:"s3_client_binaries,omitempty"` LatestRevision *string `json:"latest_revision"` }
func (*APIClientConfig) BuildFromService ¶
func (a *APIClientConfig) BuildFromService(c evergreen.ClientConfig)
func (*APIClientConfig) ToService ¶
func (a *APIClientConfig) ToService() evergreen.ClientConfig
type APICloudProviders ¶
type APICloudProviders struct { AWS *APIAWSConfig `json:"aws"` Docker *APIDockerConfig `json:"docker"` }
func (*APICloudProviders) BuildFromService ¶
func (a *APICloudProviders) BuildFromService(h interface{}) error
func (*APICloudProviders) ToService ¶
func (a *APICloudProviders) ToService() (interface{}, error)
type APICommitQueue ¶
type APICommitQueue struct { ProjectID *string `json:"queue_id"` Message *string `json:"message"` // note: this field is not populated by the conversion methods Owner *string `json:"owner"` Repo *string `json:"repo"` Queue []APICommitQueueItem `json:"queue"` }
func (*APICommitQueue) BuildFromService ¶
func (cq *APICommitQueue) BuildFromService(cqService commitqueue.CommitQueue)
type APICommitQueueConfig ¶
type APICommitQueueConfig struct { MergeTaskDistro *string `json:"merge_task_distro"` CommitterName *string `json:"committer_name"` CommitterEmail *string `json:"committer_email"` BatchSize int `json:"batch_size"` }
func (*APICommitQueueConfig) BuildFromService ¶
func (a *APICommitQueueConfig) BuildFromService(h interface{}) error
func (*APICommitQueueConfig) ToService ¶
func (a *APICommitQueueConfig) ToService() (interface{}, error)
type APICommitQueueItem ¶
type APICommitQueueItem struct { Issue *string `json:"issue"` PatchId *string `json:"patch_id"` Version *string `json:"version"` EnqueueTime *time.Time `json:"enqueueTime"` Modules []APIModule `json:"modules"` Patch *APIPatch `json:"patch"` MessageOverride *string `json:"message_override"` Source *string `json:"source"` QueueLengthAtEnqueue *int `json:"queue_length_at_enqueue"` }
func (*APICommitQueueItem) BuildFromService ¶
func (item *APICommitQueueItem) BuildFromService(cqItemService commitqueue.CommitQueueItem)
func (*APICommitQueueItem) ToService ¶
func (item *APICommitQueueItem) ToService() commitqueue.CommitQueueItem
type APICommitQueueItemAuthor ¶
type APICommitQueueItemAuthor struct {
Author *string `json:"author"`
}
type APICommitQueueParams ¶
type APICommitQueueParams struct { // Enable/disable the commit queue. Enabled *bool `json:"enabled"` // Method of merging (squash, merge, or rebase). MergeMethod *string `json:"merge_method"` // Merge queue to use (EVERGREEN or GITHUB). MergeQueue model.MergeQueue `json:"merge_queue"` // Message to display when users interact with the commit queue. Message *string `json:"message"` }
func (*APICommitQueueParams) BuildFromService ¶
func (cqParams *APICommitQueueParams) BuildFromService(params model.CommitQueueParams)
func (*APICommitQueueParams) ToService ¶
func (cqParams *APICommitQueueParams) ToService() model.CommitQueueParams
type APICommitQueuePosition ¶
type APICommitQueuePosition struct {
Position int `json:"position"`
}
type APIContainerOptions ¶
type APIContainerOptions struct { CPU int `json:"cpu"` MemoryMB int `json:"memory_mb"` WorkingDir *string `json:"working_dir,omitempty"` Image *string `json:"image,omitempty"` RepoCredsName *string `json:"repo_creds_name,omitempty"` OS *string `json:"os,omitempty"` Arch *string `json:"arch,omitempty"` WindowsVersion *string `json:"windows_version,omitempty"` }
func (*APIContainerOptions) BuildFromService ¶
func (o *APIContainerOptions) BuildFromService(dbOpts task.ContainerOptions)
func (*APIContainerOptions) ToService ¶
func (o *APIContainerOptions) ToService() task.ContainerOptions
type APIContainerPool ¶
type APIContainerPool struct { Distro *string `json:"distro"` Id *string `json:"id"` MaxContainers int `json:"max_containers"` Port uint16 `json:"port"` }
func (*APIContainerPool) BuildFromService ¶
func (a *APIContainerPool) BuildFromService(h interface{}) error
func (*APIContainerPool) ToService ¶
func (a *APIContainerPool) ToService() (interface{}, error)
type APIContainerPoolsConfig ¶
type APIContainerPoolsConfig struct {
Pools []APIContainerPool `json:"pools"`
}
func (*APIContainerPoolsConfig) BuildFromService ¶
func (a *APIContainerPoolsConfig) BuildFromService(h interface{}) error
func (*APIContainerPoolsConfig) ToService ¶
func (a *APIContainerPoolsConfig) ToService() (interface{}, error)
type APIContainerResourceInfo ¶
type APIContainerResourceInfo struct { ExternalID *string `json:"external_id,omitempty"` Name *string `json:"name,omitempty"` SecretIDs []string `json:"secret_ids,omitempty"` }
APIPodResourceInfo represents information about external resources associated with a container.
func (*APIContainerResourceInfo) BuildFromService ¶
func (i *APIContainerResourceInfo) BuildFromService(info pod.ContainerResourceInfo)
BuildFromService converts service-layer container resource information into REST API container resource information.
func (*APIContainerResourceInfo) ToService ¶
func (i *APIContainerResourceInfo) ToService() pod.ContainerResourceInfo
ToService converts REST API container resource information into service-layer container resource information.
type APIContainerResources ¶
type APIContainerResources struct { // Name for container resource definition. Name *string `bson:"name" json:"name"` // Memory (in MB) for the container. MemoryMB *int `bson:"memory_mb" json:"memory_mb"` // CPU (1024 CPU = 1 vCPU) for the container. CPU *int `bson:"cpu" json:"cpu"` }
func (*APIContainerResources) BuildFromService ¶
func (cr *APIContainerResources) BuildFromService(h model.ContainerResources)
func (*APIContainerResources) ToService ¶
func (cr *APIContainerResources) ToService() model.ContainerResources
type APIContainerSecret ¶
type APIContainerSecret struct { // Name of the container secret. Name *string `json:"name"` // External name of the container secrets. Cannot be modified by users. ExternalName *string `json:"external_name"` // External identifier for the container secret. Cannot be modified by // users. ExternalID *string `json:"external_id"` // Type of container secret. Type *string `json:"type"` // Container secret value to set. Value *string `json:"value"` // ShouldRotate indicates that the user requested the pod secret to be // rotated to a new value. This only applies to the project's pod secret. ShouldRotate *bool `json:"should_rotate"` // RepoCreds, if set, are the new repository credentials to store. This only // applies to repository credentials. RepoCreds *APIRepositoryCredentials `json:"repo_creds"` }
func (*APIContainerSecret) BuildFromService ¶
func (cr *APIContainerSecret) BuildFromService(h model.ContainerSecret) error
func (*APIContainerSecret) ToService ¶
func (cr *APIContainerSecret) ToService() (*model.ContainerSecret, error)
type APICreateHost ¶
type APICreateHost struct { DNSName *string `json:"dns_name,omitempty"` IP *string `json:"ip_address,omitempty"` IPv4 *string `json:"ipv4_address,omitempty"` InstanceID *string `json:"instance_id,omitempty"` HostID *string `json:"host_id,omitempty"` ParentID *string `json:"parent_id,omitempty"` Image *string `json:"image,omitempty"` Command *string `json:"command,omitempty"` PortBindings host.PortMap `json:"port_bindings,omitempty"` }
func (*APICreateHost) BuildFromService ¶
func (createHost *APICreateHost) BuildFromService(h host.Host)
type APICreatePod ¶
type APICreatePod struct { Name *string `json:"name"` Memory *int `json:"memory"` CPU *int `json:"cpu"` Image *string `json:"image"` RepoCredsExternalID *string `json:"repo_creds_external_id"` OS APIPodOS `json:"os"` Arch APIPodArch `json:"arch"` WindowsVersion APIPodWindowsVersion `json:"windows_version"` WorkingDir *string `json:"working_dir"` PodSecretExternalID *string `json:"pod_secret_external_id"` PodSecretValue *string `json:"pod_secret_value"` }
APICreatePod is the model to create a new pod.
type APICreatePodResponse ¶
type APICreatePodResponse struct {
ID string `json:"id"`
}
type APIDBUser ¶
type APIDBUser struct { BetaFeatures APIBetaFeatures `json:"beta_features"` DisplayName *string `json:"display_name"` EmailAddress *string `json:"email_address"` // will be set to true if the user represents a service user OnlyApi bool `json:"only_api"` Roles []string `json:"roles"` ParsleyFilters []APIParsleyFilter `json:"parsley_filters"` ParsleySettings APIParsleySettings `json:"parsley_settings"` Settings APIUserSettings `json:"settings"` UserID *string `json:"user_id"` }
func (*APIDBUser) BuildFromService ¶
BuildFromService converts a service layer user.DBUser to an APIDBUser.
type APIDependency ¶
type APIDependency struct { TaskId string `bson:"_id" json:"id"` Status string `bson:"status" json:"status"` }
func (*APIDependency) BuildFromService ¶
func (ad *APIDependency) BuildFromService(dep task.Dependency)
type APIDispatcherSettings ¶
type APIDispatcherSettings struct {
Version *string `json:"version"`
}
func (*APIDispatcherSettings) BuildFromService ¶
func (s *APIDispatcherSettings) BuildFromService()
BuildFromService converts from service level distro.DispatcherSettings to an APIDispatcherSettings
func (*APIDispatcherSettings) ToService ¶
func (s *APIDispatcherSettings) ToService() distro.DispatcherSettings
ToService returns a service layer distro.DispatcherSettings using the data from APIDispatcherSettings
type APIDisplayTask ¶
type APIDisplayTask struct { Name *string `json:"name"` ExecutionTasks []string `json:"execution_tasks"` }
func APIDisplayTaskBuildFromService ¶
func APIDisplayTaskBuildFromService(t patch.DisplayTask) *APIDisplayTask
APIDisplayTaskBuildFromService takes the patch.DisplayTask DB struct and returns the REST struct *APIDisplayTask with the corresponding fields populated
type APIDistro ¶
type APIDistro struct { Name *string `json:"name"` AdminOnly bool `json:"admin_only"` Aliases []string `json:"aliases"` UserSpawnAllowed bool `json:"user_spawn_allowed"` Provider *string `json:"provider"` ProviderSettingsList []*birch.Document `json:"provider_settings" swaggertype:"object"` Arch *string `json:"arch"` WorkDir *string `json:"work_dir"` SetupAsSudo bool `json:"setup_as_sudo"` Setup *string `json:"setup"` User *string `json:"user"` BootstrapSettings APIBootstrapSettings `json:"bootstrap_settings"` SSHOptions []string `json:"ssh_options"` AuthorizedKeysFile *string `json:"authorized_keys_file"` Expansions []APIExpansion `json:"expansions"` Disabled bool `json:"disabled"` ContainerPool *string `json:"container_pool"` FinderSettings APIFinderSettings `json:"finder_settings"` PlannerSettings APIPlannerSettings `json:"planner_settings"` DispatcherSettings APIDispatcherSettings `json:"dispatcher_settings"` HostAllocatorSettings APIHostAllocatorSettings `json:"host_allocator_settings"` DisableShallowClone bool `json:"disable_shallow_clone"` HomeVolumeSettings APIHomeVolumeSettings `json:"home_volume_settings"` IcecreamSettings APIIceCreamSettings `json:"icecream_settings"` IsVirtualWorkstation bool `json:"is_virtual_workstation"` IsCluster bool `json:"is_cluster"` Note *string `json:"note"` WarningNote *string `json:"warning_note"` ValidProjects []*string `json:"valid_projects"` Mountpoints []string `json:"mountpoints"` ImageID *string `json:"image_id"` ExecUser *string `json:"exec_user"` }
func (*APIDistro) BuildFromService ¶
BuildFromService converts from service level distro.Distro to an APIDistro
type APIDockerConfig ¶
type APIDockerConfig struct {
APIVersion *string `json:"api_version"`
}
func (*APIDockerConfig) BuildFromService ¶
func (a *APIDockerConfig) BuildFromService(h interface{}) error
func (*APIDockerConfig) ToService ¶
func (a *APIDockerConfig) ToService() (interface{}, error)
type APIDuration ¶
type APIDuration uint64
Represents duration in milliseconds
func NewAPIDuration ¶
func NewAPIDuration(d time.Duration) APIDuration
func UnmarshalAPIDuration ¶
func UnmarshalAPIDuration(v interface{}) (APIDuration, error)
func (APIDuration) ToDuration ¶
func (i APIDuration) ToDuration() time.Duration
type APIEC2Key ¶
type APIEC2Key struct { Name *string `json:"name"` Region *string `json:"region"` Key *string `json:"key"` Secret *string `json:"secret"` }
func (*APIEC2Key) BuildFromService ¶
type APIECSCapacityProvider ¶
type APIECSCapacityProvider struct { Name *string `json:"name"` OS *string `json:"os"` Arch *string `json:"arch"` WindowsVersion *string `json:"windows_version"` }
APIECSCapacityProvider represents configuration options for a capacity provider within an ECS cluster.
func (*APIECSCapacityProvider) BuildFromService ¶
func (a *APIECSCapacityProvider) BuildFromService(cp evergreen.ECSCapacityProvider)
func (*APIECSCapacityProvider) ToService ¶
func (a *APIECSCapacityProvider) ToService() (*evergreen.ECSCapacityProvider, error)
type APIECSClusterConfig ¶
APIECSClusterConfig represents configuration options for a cluster in AWS ECS.
func (*APIECSClusterConfig) BuildFromService ¶
func (a *APIECSClusterConfig) BuildFromService(conf evergreen.ECSClusterConfig)
func (*APIECSClusterConfig) ToService ¶
func (a *APIECSClusterConfig) ToService() (*evergreen.ECSClusterConfig, error)
type APIECSConfig ¶
type APIECSConfig struct { MaxCPU *int `json:"max_cpu"` MaxMemoryMB *int `json:"max_memory_mb"` TaskDefinitionPrefix *string `json:"task_definition_prefix"` TaskRole *string `json:"task_role"` ExecutionRole *string `json:"execution_role"` LogRegion *string `json:"log_region"` LogGroup *string `json:"log_group"` LogStreamPrefix *string `json:"log_stream_prefix"` AWSVPC *APIAWSVPCConfig `json:"awsvpc"` Clusters []APIECSClusterConfig `json:"clusters"` CapacityProviders []APIECSCapacityProvider `json:"capacity_providers"` AllowedImages []string `json:"allowed_images"` }
APIECSConfig represents configuration options for AWS ECS.
func (*APIECSConfig) BuildFromService ¶
func (a *APIECSConfig) BuildFromService(conf evergreen.ECSConfig)
type APIEmail ¶
type APIEmail struct { Recipients []string `json:"recipients"` Subject *string `json:"subject"` Body *string `json:"body"` PlainTextContents bool `json:"is_plain_text"` Headers map[string][]string `json:"headers"` }
func (*APIEmail) BuildFromService ¶
BuildFromService converts from service level message.Email to an APIEmail.
type APIEntry ¶
type APIEntry struct { TaskId *string `json:"task_id"` TaskDisplayName *string `json:"task_name"` BuildId *string `json:"build"` Files []APIFile `json:"files"` Execution int `json:"execution"` }
func (*APIEntry) BuildFromService ¶
type APIEnvVar ¶
func (*APIEnvVar) BuildFromService ¶
BuildFromService converts a service level distro.EnvVar to an APIEnvVar
type APIEventStats ¶
type APIEventStats struct { LastProcessedAt *time.Time `json:"last_processed_at"` NumUnprocessedEvents int `json:"unprocessed_events"` PendingNotificationsByType apiNotificationStats `json:"pending_notifications_by_type"` }
func (*APIEventStats) BuildFromService ¶
func (n *APIEventStats) BuildFromService(stats notification.NotificationStats)
type APIExpansion ¶
APIExpansion is derived from a service layer distro.Expansion
func (*APIExpansion) BuildFromService ¶
func (e *APIExpansion) BuildFromService(val distro.Expansion)
BuildFromService converts a service level distro.Expansion to an APIExpansion
func (*APIExpansion) ToService ¶
func (e *APIExpansion) ToService() distro.Expansion
ToService returns a service layer distro.Expansion using the data from an APIExpansion
type APIExternalLink ¶
type APIExternalLink struct { // Display name for the URL. DisplayName *string `json:"display_name"` // Requester filter for when to display the link. Requesters []*string `json:"requesters"` // URL format to add to the version metadata panel. URLTemplate *string `json:"url_template"` }
func (*APIExternalLink) BuildFromService ¶
func (t *APIExternalLink) BuildFromService(h model.ExternalLink)
func (*APIExternalLink) ToService ¶
func (t *APIExternalLink) ToService() model.ExternalLink
type APIFailingCommand ¶
type APIFailingCommand struct { // FullDisplayName is the full display name of the failing command. FullDisplayName *string `json:"full_display_name,omitempty"` // FailureMetadataTags are tags associated with the failing command. FailureMetadataTags []string `json:"failure_metadata_tags,omitempty"` }
APIFailingCommand represents information about a command that failed in a task.
func (*APIFailingCommand) BuildFromService ¶
func (afc *APIFailingCommand) BuildFromService(fc apimodels.FailingCommand)
func (*APIFailingCommand) ToService ¶
func (afc *APIFailingCommand) ToService() apimodels.FailingCommand
type APIFeedbackSubmission ¶
type APIFeedbackSubmission struct { Type *string `json:"type"` User *string `json:"user"` SubmittedAt *time.Time `json:"submitted_at"` Questions []APIQuestionAnswer `json:"questions"` }
func (*APIFeedbackSubmission) ToService ¶
func (a *APIFeedbackSubmission) ToService() (model.FeedbackSubmission, error)
type APIFile ¶
type APIFile struct { // Human-readable name of the file Name *string `json:"name"` // Link to the file Link *string `json:"url"` URLParsley *string `json:"url_parsley"` // Determines who can see the file in the UI Visibility *string `json:"visibility"` // When true, these artifacts are excluded from reproduction IgnoreForFetch bool `json:"ignore_for_fetch"` ContentType *string `json:"content_type"` }
func (*APIFile) BuildFromService ¶
type APIFinderSettings ¶
type APIFinderSettings struct {
Version *string `json:"version"`
}
func (*APIFinderSettings) BuildFromService ¶
func (s *APIFinderSettings) BuildFromService(settings distro.FinderSettings)
BuildFromService converts from service level distro.FinderSettings to an APIFinderSettings
func (*APIFinderSettings) ToService ¶
func (s *APIFinderSettings) ToService() distro.FinderSettings
ToService returns a service layer distro.FinderSettings using the data from APIFinderSettings
type APIGeneratedTaskInfo ¶
type APIGeneratedTaskInfo struct { // The unique identifier of the task TaskID string `json:"task_id"` // The display name of the task TaskName string `json:"task_name"` // The unique identifier of the build BuildID string `json:"build_id"` // The name of the build variant BuildVariant string `json:"build_variant"` // The display name of the build variant BuildVariantDisplayName string `json:"build_variant_display_name"` }
APIGeneratedTaskInfo contains basic information about a generated task.
func (*APIGeneratedTaskInfo) BuildFromService ¶
func (i *APIGeneratedTaskInfo) BuildFromService(dbInfo task.GeneratedTaskInfo)
type APIGitHubCheckRunConfig ¶
type APIGitHubCheckRunConfig struct {
CheckRunLimit *int `json:"check_run_limit"`
}
func (*APIGitHubCheckRunConfig) BuildFromService ¶
func (c *APIGitHubCheckRunConfig) BuildFromService(h interface{}) error
func (*APIGitHubCheckRunConfig) ToService ¶
func (c *APIGitHubCheckRunConfig) ToService() (interface{}, error)
type APIGitHubDynamicTokenPermissionGroup ¶
type APIGitHubDynamicTokenPermissionGroup struct { // Name of the GitHub permission group. Name *string `json:"name"` // Permissions for the GitHub permission group. Permissions map[string]string `json:"permissions"` // AllPermissions is a flag that indicates that the group has all permissions. // If this is set to true, the Permissions field is ignored. // If this is set to false, the Permissions field is used (and may be // nil, representing no permissions). AllPermissions *bool `json:"all_permissions"` }
func (*APIGitHubDynamicTokenPermissionGroup) BuildFromService ¶
func (p *APIGitHubDynamicTokenPermissionGroup) BuildFromService(h model.GitHubDynamicTokenPermissionGroup) error
func (*APIGitHubDynamicTokenPermissionGroup) ToService ¶
func (p *APIGitHubDynamicTokenPermissionGroup) ToService() (model.GitHubDynamicTokenPermissionGroup, error)
type APIGithubAppAuth ¶
func (*APIGithubAppAuth) BuildFromService ¶
func (g *APIGithubAppAuth) BuildFromService(v githubapp.GithubAppAuth)
func (*APIGithubAppAuth) ToService ¶
func (g *APIGithubAppAuth) ToService() *githubapp.GithubAppAuth
type APIGithubAuthConfig ¶
type APIGithubAuthConfig struct { AppId int64 `json:"app_id"` ClientId *string `json:"client_id"` ClientSecret *string `json:"client_secret"` DefaultOwner *string `json:"default_owner"` DefaultRepo *string `json:"default_repo"` Organization *string `json:"organization"` Users []*string `json:"users"` }
func (*APIGithubAuthConfig) BuildFromService ¶
func (a *APIGithubAuthConfig) BuildFromService(h interface{}) error
func (*APIGithubAuthConfig) ToService ¶
func (a *APIGithubAuthConfig) ToService() (interface{}, error)
type APIGithubCheckSubscriber ¶
type APIGithubCheckSubscriber struct { Owner *string `json:"owner" mapstructure:"owner"` Repo *string `json:"repo" mapstructure:"repo"` Ref *string `json:"ref" mapstructure:"ref"` }
func (*APIGithubCheckSubscriber) BuildFromService ¶
func (s *APIGithubCheckSubscriber) BuildFromService(h interface{}) error
func (*APIGithubCheckSubscriber) ToService ¶
func (s *APIGithubCheckSubscriber) ToService() event.GithubCheckSubscriber
type APIGithubMergeSubscriber ¶
type APIGithubMergeSubscriber struct { Owner *string `json:"owner" mapstructure:"owner"` Repo *string `json:"repo" mapstructure:"repo"` Ref *string `json:"ref" mapstructure:"ref"` }
func (*APIGithubMergeSubscriber) BuildFromService ¶
func (s *APIGithubMergeSubscriber) BuildFromService(h interface{}) error
func (*APIGithubMergeSubscriber) ToService ¶
func (s *APIGithubMergeSubscriber) ToService() event.GithubMergeSubscriber
type APIGithubPRSubscriber ¶
type APIGithubPRSubscriber struct { Owner *string `json:"owner" mapstructure:"owner"` Repo *string `json:"repo" mapstructure:"repo"` PRNumber int `json:"pr_number" mapstructure:"pr_number"` Ref *string `json:"ref" mapstructure:"ref"` }
func (*APIGithubPRSubscriber) BuildFromService ¶
func (s *APIGithubPRSubscriber) BuildFromService(h interface{}) error
func (*APIGithubPRSubscriber) ToService ¶
func (s *APIGithubPRSubscriber) ToService() event.GithubPullRequestSubscriber
type APIGithubUser ¶
type APIGithubUser struct { UID int `json:"uid,omitempty"` LastKnownAs *string `json:"last_known_as,omitempty"` }
func (*APIGithubUser) BuildFromService ¶
func (g *APIGithubUser) BuildFromService(usr user.GithubUser)
func (*APIGithubUser) ToService ¶
func (g *APIGithubUser) ToService() user.GithubUser
type APIHomeVolumeSettings ¶
type APIHomeVolumeSettings struct {
FormatCommand *string `json:"format_command"`
}
func (*APIHomeVolumeSettings) BuildFromService ¶
func (s *APIHomeVolumeSettings) BuildFromService(settings distro.HomeVolumeSettings)
func (*APIHomeVolumeSettings) ToService ¶
func (s *APIHomeVolumeSettings) ToService() distro.HomeVolumeSettings
type APIHost ¶
type APIHost struct { // Unique identifier of a specific host Id *string `json:"host_id"` HostURL *string `json:"host_url"` PersistentDNSName *string `json:"persistent_dns_name"` Tag *string `json:"tag"` // Object containing information about the distro type of this host Distro DistroInfo `json:"distro"` Provisioned bool `json:"provisioned"` // Name of the process or user that started this host StartedBy *string `json:"started_by"` // The instance type requested for the provider, primarily used for ec2 dynamic hosts Provider *string `json:"host_type"` // The user associated with this host. Set if this host was spawned for a specific user User *string `json:"user"` // The current state of the host Status *string `json:"status"` // Object containing information about the task the host is currently running RunningTask TaskInfo `json:"running_task"` UserHost bool `json:"user_host"` NoExpiration bool `json:"no_expiration"` InstanceTags []host.Tag `json:"instance_tags"` InstanceType *string `json:"instance_type"` AvailabilityZone *string `json:"zone"` DisplayName *string `json:"display_name"` HomeVolumeID *string `json:"home_volume_id"` LastCommunicationTime time.Time `json:"last_communication"` TotalIdleTime APIDuration `json:"total_idle_time"` CreationTime *time.Time `json:"creation_time"` Expiration *time.Time `json:"expiration_time"` AttachedVolumeIDs []string `json:"attached_volume_ids"` // Contains options for spawn hosts. ProvisionOptions APIProvisionOptions `json:"provision_options"` NeedsReprovision *string `json:"needs_reprovision"` }
APIHost is the model to be returned by the API whenever hosts are fetched.
type APIHostAllocatorSettings ¶
type APIHostAllocatorSettings struct { Version *string `json:"version"` MinimumHosts int `json:"minimum_hosts"` MaximumHosts int `json:"maximum_hosts"` RoundingRule *string `json:"rounding_rule"` FeedbackRule *string `json:"feedback_rule"` HostsOverallocatedRule *string `json:"hosts_overallocated_rule"` AcceptableHostIdleTime APIDuration `json:"acceptable_host_idle_time"` FutureHostFraction float64 `json:"future_host_fraction"` }
func (*APIHostAllocatorSettings) BuildFromService ¶
func (s *APIHostAllocatorSettings) BuildFromService(settings distro.HostAllocatorSettings)
BuildFromService converts from service level distro.HostAllocatorSettings to an APIHostAllocatorSettings
func (*APIHostAllocatorSettings) ToService ¶
func (s *APIHostAllocatorSettings) ToService() distro.HostAllocatorSettings
ToService returns a service layer distro.HostAllocatorSettings using the data from APIHostAllocatorSettings
type APIHostCreateDetail ¶
type APIHostCreateDetail struct { HostId *string `bson:"host_id" json:"host_id"` Error *string `bson:"error" json:"error"` }
func (*APIHostCreateDetail) BuildFromService ¶
func (a *APIHostCreateDetail) BuildFromService(t interface{}) error
func (*APIHostCreateDetail) ToService ¶
func (a *APIHostCreateDetail) ToService() (interface{}, error)
type APIHostInitConfig ¶
type APIHostInitConfig struct { HostThrottle int `json:"host_throttle"` ProvisioningThrottle int `json:"provisioning_throttle"` CloudStatusBatchSize int `json:"cloud_batch_size"` MaxTotalDynamicHosts int `json:"max_total_dynamic_hosts"` }
func (*APIHostInitConfig) BuildFromService ¶
func (a *APIHostInitConfig) BuildFromService(h interface{}) error
func (*APIHostInitConfig) ToService ¶
func (a *APIHostInitConfig) ToService() (interface{}, error)
type APIHostIsUpOptions ¶
type APIHostJasperConfig ¶
type APIHostJasperConfig struct { BinaryName *string `json:"binary_name,omitempty"` DownloadFileName *string `json:"download_file_name,omitempty"` Port int `json:"port,omitempty"` URL *string `json:"url,omitempty"` Version *string `json:"version,omitempty"` }
func (*APIHostJasperConfig) BuildFromService ¶
func (c *APIHostJasperConfig) BuildFromService(h interface{}) error
func (*APIHostJasperConfig) ToService ¶
func (c *APIHostJasperConfig) ToService() (interface{}, error)
type APIHostParams ¶
type APIHostProcess ¶
type APIHostProvisioningOptions ¶
type APIHostProvisioningOptions struct {
Content string `json:"content"`
}
APIHostProvisioningOptions represents the script to provision a host.
type APIHostScript ¶
type APIHostStatsByDistro ¶
type APIHostStatsByDistro struct {
Distros []apiHostStatsForDistro `json:"distros"`
}
APIHostStatsByDistro is a slice of host stats for a distro the 3 structs below are nested within it
func (*APIHostStatsByDistro) BuildFromService ¶
func (s *APIHostStatsByDistro) BuildFromService(stats []host.StatsByDistro)
BuildFromService takes the slice of stats returned by GetHostStatsByDistro and embeds them so that the return value is a slice of distros
type APIIceCreamSettings ¶
type APIIceCreamSettings struct { SchedulerHost *string `json:"scheduler_host"` ConfigPath *string `json:"config_path"` }
func (*APIIceCreamSettings) BuildFromService ¶
func (s *APIIceCreamSettings) BuildFromService(settings distro.IceCreamSettings)
func (*APIIceCreamSettings) ToService ¶
func (s *APIIceCreamSettings) ToService() distro.IceCreamSettings
type APIImage ¶
type APIImage struct { ID *string `json:"id"` AMI *string `json:"ami"` LastDeployed *time.Time `json:"last_deployed"` }
APIImage is the model to be returned by the API whenever images are fetched.
func (*APIImage) BuildFromService ¶
func (apiImage *APIImage) BuildFromService(image thirdparty.DistroImage)
BuildFromService converts from service level thirdparty.Image to an APIImage.
func (*APIImage) ToService ¶
func (apiImage *APIImage) ToService() *thirdparty.DistroImage
ToService returns a service layer image using the data from APIImage.
type APIImageEvent ¶
type APIImageEvent struct { Entries []APIImageEventEntry `json:"entries"` Timestamp *time.Time `json:"timestamp"` AMIBefore *string `json:"ami_before"` AMIAfter *string `json:"ami_after"` }
APIImageEvent is the model to be returned by the API whenever image events are fetched.
func (*APIImageEvent) BuildFromService ¶
func (apiImageEvent *APIImageEvent) BuildFromService(imageEvent thirdparty.ImageEvent)
BuildFromService converts from service level thirdparty.ImageEvent to an APIImageEvent.
func (*APIImageEvent) ToService ¶
func (apiImage *APIImageEvent) ToService() *thirdparty.ImageEvent
ToService returns a service layer image event using the data from APIImageEvent.
type APIImageEventEntry ¶
type APIImageEventEntry struct { Name *string `json:"name"` Before *string `json:"before"` After *string `json:"after"` Type thirdparty.ImageEventType `json:"type"` Action thirdparty.ImageEventEntryAction `json:"action"` }
APIImageEventEntry is the model to be returned by the API whenever image event entries are fetched.
func (*APIImageEventEntry) BuildFromService ¶
func (apiImageEventEntry *APIImageEventEntry) BuildFromService(imageEventEntry thirdparty.ImageEventEntry)
BuildFromService converts from service level thirdparty.ImageEventEntry to an APIImageEventEntry.
func (*APIImageEventEntry) ToService ¶
func (apiImageEventEntry *APIImageEventEntry) ToService() *thirdparty.ImageEventEntry
ToService returns a service layer image event entry using the data from APIImageEventEntry.
type APIIssueLink ¶
type APIIssueLink struct { // The url of the ticket URL *string `bson:"url" json:"url"` // Text to be displayed IssueKey *string `bson:"issue_key,omitempty" json:"issue_key,omitempty"` // The source of the edit Source *APISource `bson:"source,omitempty" json:"source,omitempty"` // The confidence score of the issue ConfidenceScore *float64 `bson:"confidence_score,omitempty" json:"confidence_score,omitempty"` }
func APIIssueLinkBuildFromService ¶
func APIIssueLinkBuildFromService(t annotations.IssueLink) *APIIssueLink
APIIssueLinkBuildFromService takes the annotations.IssueLink DB struct and returns the REST struct *APIIssueLink with the corresponding fields populated
func BuildAPIIssueLinks ¶
func BuildAPIIssueLinks(t []annotations.IssueLink) []APIIssueLink
BuildAPIIssueLinks converts a slice of annotations.IssueLink to a slice of APIIssueLink
type APIJIRAIssueSubscriber ¶
type APIJIRAIssueSubscriber struct { Project *string `json:"project" mapstructure:"project"` IssueType *string `json:"issue_type" mapstructure:"issue_type"` }
func (*APIJIRAIssueSubscriber) BuildFromService ¶
func (s *APIJIRAIssueSubscriber) BuildFromService(h interface{}) error
func (*APIJIRAIssueSubscriber) ToService ¶
func (s *APIJIRAIssueSubscriber) ToService() event.JIRAIssueSubscriber
type APIJIRANotificationsConfig ¶
type APIJIRANotificationsConfig struct {
CustomFields map[string]APIJIRANotificationsProject `json:"custom_fields,omitempty"`
}
func (*APIJIRANotificationsConfig) BuildFromService ¶
func (j *APIJIRANotificationsConfig) BuildFromService(h interface{}) error
func (*APIJIRANotificationsConfig) ToService ¶
func (j *APIJIRANotificationsConfig) ToService() (interface{}, error)
type APIJIRANotificationsProject ¶
type APIJIRANotificationsProject struct { Fields map[string]string `json:"fields,omitempty"` Components []string `json:"components,omitempty"` Labels []string `json:"labels,omitempty"` }
func (*APIJIRANotificationsProject) BuildFromService ¶
func (j *APIJIRANotificationsProject) BuildFromService(h interface{}) error
func (*APIJIRANotificationsProject) ToService ¶
func (j *APIJIRANotificationsProject) ToService() (interface{}, error)
type APIJiraBasicAuth ¶
type APIJiraBasicAuth struct { Username *string `json:"username"` Password *string `json:"password"` }
func (*APIJiraBasicAuth) BuildFromService ¶
func (a *APIJiraBasicAuth) BuildFromService(c evergreen.JiraBasicAuthConfig)
func (*APIJiraBasicAuth) ToService ¶
func (a *APIJiraBasicAuth) ToService() evergreen.JiraBasicAuthConfig
type APIJiraConfig ¶
type APIJiraConfig struct { Host *string `json:"host"` DefaultProject *string `json:"default_project"` Email *string `json:"email"` BasicAuthConfig *APIJiraBasicAuth `json:"basic_auth"` OAuth1Config *APIJiraOAuth1 `json:"oauth1"` }
func (*APIJiraConfig) BuildFromService ¶
func (a *APIJiraConfig) BuildFromService(h interface{}) error
func (*APIJiraConfig) ToService ¶
func (a *APIJiraConfig) ToService() (interface{}, error)
type APIJiraOAuth1 ¶
type APIJiraOAuth1 struct { PrivateKey *string `json:"private_key"` AccessToken *string `json:"access_token"` TokenSecret *string `json:"token_secret"` ConsumerKey *string `json:"consumer_key"` }
func (*APIJiraOAuth1) BuildFromService ¶
func (a *APIJiraOAuth1) BuildFromService(c evergreen.JiraOAuth1Config)
func (*APIJiraOAuth1) ToService ¶
func (a *APIJiraOAuth1) ToService() evergreen.JiraOAuth1Config
type APIKanopyAuthConfig ¶
type APIKanopyAuthConfig struct { HeaderName *string `json:"header_name"` Issuer *string `json:"issuer"` KeysetURL *string `json:"keyset_url"` }
func (*APIKanopyAuthConfig) BuildFromService ¶
func (a *APIKanopyAuthConfig) BuildFromService(h interface{}) error
func (*APIKanopyAuthConfig) ToService ¶
func (a *APIKanopyAuthConfig) ToService() (interface{}, error)
type APILogBuffering ¶
type APILogBuffering struct { UseAsync bool `json:"use_async"` DurationSeconds int `json:"duration_seconds"` Count int `json:"count"` IncomingBufferFactor int `json:"incoming_buffer_factor"` }
func (*APILogBuffering) BuildFromService ¶
func (a *APILogBuffering) BuildFromService(h interface{}) error
func (*APILogBuffering) ToService ¶
func (a *APILogBuffering) ToService() (interface{}, error)
type APILoggerConfig ¶
type APILoggerConfig struct { Buffer *APILogBuffering `json:"buffer"` DefaultLevel *string `json:"default_level"` ThresholdLevel *string `json:"threshold_level"` LogkeeperURL *string `json:"logkeeper_url"` }
func (*APILoggerConfig) BuildFromService ¶
func (a *APILoggerConfig) BuildFromService(h interface{}) error
func (*APILoggerConfig) ToService ¶
func (a *APILoggerConfig) ToService() (interface{}, error)
type APIMetadataLink ¶
type APIMetadataLink struct { // The url of the link URL *string `bson:"url" json:"url"` // Text to be displayed Text *string `bson:"text" json:"text"` // The source of the edit Source *APISource `bson:"source,omitempty" json:"source,omitempty"` }
func APIMetadataLinkBuildFromService ¶
func APIMetadataLinkBuildFromService(t annotations.MetadataLink) *APIMetadataLink
APIMetadataLinkBuildFromService takes the annotations.MetadataLink DB struct and returns the REST struct *APIIssueLink with the corresponding fields populated
func BuildAPIMetadataLinks ¶
func BuildAPIMetadataLinks(t []annotations.MetadataLink) []APIMetadataLink
BuildAPIMetadataLinks converts a slice of annotations.MetadataLink to a slice of APIMetadataLink
type APIModule ¶
func APIModuleBuildFromService ¶
func APIModuleBuildFromService(t commitqueue.Module) *APIModule
APIModuleBuildFromService takes the commitqueue.Module DB struct and returns the REST struct *APIModule with the corresponding fields populated
type APIModulePatch ¶
type APIMultiAuthConfig ¶
type APIMultiAuthConfig struct { ReadWrite []string `json:"read_write"` ReadOnly []string `json:"read_only"` }
func (*APIMultiAuthConfig) BuildFromService ¶
func (a *APIMultiAuthConfig) BuildFromService(h interface{}) error
func (*APIMultiAuthConfig) ToService ¶
func (a *APIMultiAuthConfig) ToService() (interface{}, error)
type APINaiveAuthConfig ¶
type APINaiveAuthConfig struct {
Users []APIAuthUser `json:"users"`
}
func (*APINaiveAuthConfig) BuildFromService ¶
func (a *APINaiveAuthConfig) BuildFromService(h interface{}) error
func (*APINaiveAuthConfig) ToService ¶
func (a *APINaiveAuthConfig) ToService() (interface{}, error)
type APINewRelicConfig ¶
type APINewRelicConfig struct { AccountID *string `json:"accountId"` TrustKey *string `json:"trustKey"` AgentID *string `json:"agentId"` LicenseKey *string `json:"licenseKey"` ApplicationID *string `json:"applicationId"` }
func (*APINewRelicConfig) BuildFromService ¶
func (a *APINewRelicConfig) BuildFromService(h interface{}) error
BuildFromService builds a model from the service layer
func (*APINewRelicConfig) ToService ¶
func (a *APINewRelicConfig) ToService() (interface{}, error)
ToService returns a service model from an API model
type APINote ¶
type APINote struct { // Comment about the task failure Message *string `bson:"message,omitempty" json:"message,omitempty"` // The source of the note Source *APISource `bson:"source,omitempty" json:"source,omitempty"` }
func APINoteBuildFromService ¶
func APINoteBuildFromService(t *annotations.Note) *APINote
APINoteBuildFromService takes the annotations.Note DB struct and returns the REST struct *APINote with the corresponding fields populated
type APINotificationPreferences ¶
type APINotificationPreferences struct { BuildBreak *string `json:"build_break"` BuildBreakID *string `json:"build_break_id,omitempty"` PatchFinish *string `json:"patch_finish"` PatchFinishID *string `json:"patch_finish_id,omitempty"` PatchFirstFailure *string `json:"patch_first_failure"` PatchFirstFailureID *string `json:"patch_first_failure_id,omitempty"` SpawnHostExpiration *string `json:"spawn_host_expiration"` SpawnHostExpirationID *string `json:"spawn_host_expiration_id,omitempty"` SpawnHostOutcome *string `json:"spawn_host_outcome"` SpawnHostOutcomeID *string `json:"spawn_host_outcome_id,omitempty"` CommitQueue *string `json:"commit_queue"` CommitQueueID *string `json:"commit_queue_id,omitempty"` }
func (*APINotificationPreferences) BuildFromService ¶
func (n *APINotificationPreferences) BuildFromService(in user.NotificationPreferences)
func (*APINotificationPreferences) ToService ¶
func (n *APINotificationPreferences) ToService() (user.NotificationPreferences, error)
type APINotifyConfig ¶
type APINotifyConfig struct { BufferTargetPerInterval int `json:"buffer_target_per_interval"` BufferIntervalSeconds int `json:"buffer_interval_seconds"` SES APISESConfig `json:"ses"` }
func (*APINotifyConfig) BuildFromService ¶
func (a *APINotifyConfig) BuildFromService(h interface{}) error
func (*APINotifyConfig) ToService ¶
func (a *APINotifyConfig) ToService() (interface{}, error)
type APINumTasksToFinalize ¶
type APINumTasksToFinalize struct {
NumTasksToFinalize *int `json:"num_tasks_to_finalize"`
}
APINumTasksToFinalize contains information on the number of tasks a generator is set to finalize.
type APIOSInfo ¶
APIOSInfo is the model to be returned by the API whenever OS information is fetched.
func (*APIOSInfo) BuildFromService ¶
func (apiOSInfo *APIOSInfo) BuildFromService(osInfo thirdparty.OSInfo)
BuildFromService converts from service level thirdparty.OSInfo to an APIOSInfo.
func (*APIOSInfo) ToService ¶
func (apiOSInfo *APIOSInfo) ToService() *thirdparty.OSInfo
ToService returns a service layer OS info using the data from APIOSInfo.
type APIOffboardUserResults ¶
type APIOktaConfig ¶
type APIOktaConfig struct { ClientID *string `json:"client_id"` ClientSecret *string `json:"client_secret"` Issuer *string `json:"issuer"` Scopes []string `json:"scopes"` UserGroup *string `json:"user_group"` ExpireAfterMinutes int `json:"expire_after_minutes"` }
func (*APIOktaConfig) BuildFromService ¶
func (a *APIOktaConfig) BuildFromService(h interface{}) error
func (*APIOktaConfig) ToService ¶
func (a *APIOktaConfig) ToService() (interface{}, error)
type APIOomTrackerInfo ¶
func (*APIOomTrackerInfo) BuildFromService ¶
func (at *APIOomTrackerInfo) BuildFromService(t *apimodels.OOMTrackerInfo)
func (*APIOomTrackerInfo) ToService ¶
func (ad *APIOomTrackerInfo) ToService() *apimodels.OOMTrackerInfo
type APIOwnerRepo ¶
func (*APIOwnerRepo) BuildFromService ¶
func (a *APIOwnerRepo) BuildFromService(h interface{}) error
func (*APIOwnerRepo) ToService ¶
func (a *APIOwnerRepo) ToService() (interface{}, error)
type APIPRInfo ¶
type APIPRInfo struct { Owner *string `json:"owner" mapstructure:"owner"` Repo *string `json:"repo" mapstructure:"repo"` PRNumber int `json:"pr_number" mapstructure:"pr_number"` Ref *string `json:"ref" mapstructure:"ref"` CommitTitle *string `json:"commit_title" mapstructure:"commit_title"` }
func (*APIPRInfo) BuildFromService ¶
type APIPackage ¶
type APIPackage struct { Name *string `json:"name"` Manager *string `json:"manager"` Version *string `json:"version"` }
APIPackage is the model to be returned by the API whenever packages are fetched.
func (*APIPackage) BuildFromService ¶
func (apiPackage *APIPackage) BuildFromService(pkg thirdparty.Package)
BuildFromService converts from service level thirdparty.Package to an APIPackage.
func (*APIPackage) ToService ¶
func (apiPackage *APIPackage) ToService() *thirdparty.Package
ToService returns a service layer package using the data from APIPackage.
type APIParameter ¶
func (*APIParameter) BuildFromService ¶
func (p *APIParameter) BuildFromService(param *patch.Parameter)
BuildFromService converts from service level parameter to an APIPatch.
func (*APIParameter) ToService ¶
func (p *APIParameter) ToService() patch.Parameter
ToService converts a service layer parameter using the data from APIParameter
type APIParameterInfo ¶
type APIParameterInfo struct { Key *string `json:"key"` Value *string `json:"value"` Description *string `json:"description"` }
func (*APIParameterInfo) BuildFromService ¶
func (c *APIParameterInfo) BuildFromService(info model.ParameterInfo)
type APIParameterStoreConfig ¶
type APIParameterStoreConfig struct {
Prefix *string `json:"prefix"`
}
func (*APIParameterStoreConfig) BuildFromService ¶
func (a *APIParameterStoreConfig) BuildFromService(ps evergreen.ParameterStoreConfig)
func (*APIParameterStoreConfig) ToService ¶
func (a *APIParameterStoreConfig) ToService() evergreen.ParameterStoreConfig
type APIParserProjectS3Config ¶
type APIParserProjectS3Config struct { APIS3Credentials Prefix *string `json:"prefix"` GeneratedJSONPrefix *string `json:"generated_json_prefix"` }
APIParserProjectS3Config represents configuration options for storing and accessing parser projects in S3.
func (*APIParserProjectS3Config) BuildFromService ¶
func (a *APIParserProjectS3Config) BuildFromService(h interface{}) error
func (*APIParserProjectS3Config) ToService ¶
func (a *APIParserProjectS3Config) ToService() (interface{}, error)
type APIParsleyFilter ¶
type APIParsleyFilter struct { // Expression is a regular expression representing the filter. Expression *string `json:"expression"` // CaseSensitive indicates whether the filter is case sensitive. CaseSensitive *bool `json:"case_sensitive"` // ExactMatch indicates whether the filter must be an exact match. ExactMatch *bool `json:"exact_match"` }
func (*APIParsleyFilter) BuildFromService ¶
func (t *APIParsleyFilter) BuildFromService(h parsley.Filter)
func (*APIParsleyFilter) ToService ¶
func (t *APIParsleyFilter) ToService() parsley.Filter
type APIParsleySettings ¶
type APIParsleySettings struct { //SectionsEnabled describes whether to render task logs with sections. SectionsEnabled *bool `json:"sections_enabled"` // JumpToFailingLineEnabled describes whether to automatically scroll to the failing log line on initial page load. JumpToFailingLineEnabled *bool `json:"jump_to_failing_line_enabled"` }
func (*APIParsleySettings) BuildFromService ¶
func (s *APIParsleySettings) BuildFromService(settings parsley.Settings)
func (*APIParsleySettings) ToService ¶
func (s *APIParsleySettings) ToService() parsley.Settings
type APIPatch ¶
type APIPatch struct { // Unique identifier of a specific patch Id *string `json:"patch_id"` // Description of the patch Description *string `json:"description"` // Name of the project ProjectId *string `json:"project_id"` ProjectIdentifier *string `json:"project_identifier"` // The branch on which the patch was initiated Branch *string `json:"branch"` // Hash of commit off which the patch was initiated Githash *string `json:"git_hash"` // Incrementing counter of user's patches PatchNumber int `json:"patch_number"` Hidden bool `json:"hidden"` // Author of the patch Author *string `json:"author"` Version *string `json:"version"` // Status of patch (possible values are "created", "started", "success", or "failed") Status *string `json:"status"` // Time patch was created CreateTime *time.Time `json:"create_time"` // Time patch started to run StartTime *time.Time `json:"start_time"` // Time at patch completion FinishTime *time.Time `json:"finish_time"` // List of identifiers of builds to run for this patch Variants []*string `json:"builds"` // List of identifiers of tasks used in this patch Tasks []*string `json:"tasks"` DownstreamTasks []DownstreamTasks `json:"downstream_tasks"` // List of documents of available tasks and associated build variant VariantsTasks []VariantTask `json:"variants_tasks"` // Whether the patch has been finalized and activated Activated bool `json:"activated"` Alias *string `json:"alias,omitempty"` GithubPatchData githubPatch `json:"github_patch_data,omitempty"` ModuleCodeChanges []APIModulePatch `json:"module_code_changes"` Parameters []APIParameter `json:"parameters"` ProjectStorageMethod *string `json:"project_storage_method,omitempty"` ChildPatches []APIPatch `json:"child_patches"` ChildPatchAliases []APIChildPatchAlias `json:"child_patch_aliases,omitempty"` Requester *string `json:"requester"` MergedFrom *string `json:"merged_from"` // Only populated for commit queue patches: returns the 0-indexed position of the patch on the queue, or -1 if not on the queue anymore CommitQueuePosition *int `json:"commit_queue_position,omitempty"` }
APIPatch is the model to be returned by the API whenever patches are fetched.
func (*APIPatch) BuildFromService ¶
func (apiPatch *APIPatch) BuildFromService(p patch.Patch, args *APIPatchArgs) error
BuildFromService converts from service level structs to an APIPatch. If args are set, includes identifier, commit queue position, and/or child patches from the DB, if applicable.
func (*APIPatch) GetCommitQueuePosition ¶
func (*APIPatch) GetIdentifier ¶
func (apiPatch *APIPatch) GetIdentifier()
type APIPatchArgs ¶
type APIPatchTriggerDefinition ¶
type APIPatchTriggerDefinition struct { // Alias to run in the downstream project. Alias *string `json:"alias"` // ID of the downstream project. ChildProjectId *string `json:"child_project_id"` // Identifier of the downstream project. ChildProjectIdentifier *string `json:"child_project_identifier"` // List of task specifiers. TaskSpecifiers []APITaskSpecifier `json:"task_specifiers"` // Status for the parent patch to conditionally kick off the child patch. Status *string `json:"status,omitempty"` // Name of the module corresponding to the upstream project in the // downstream project's YAML. ParentAsModule *string `json:"parent_as_module,omitempty"` // An optional field representing the revision at which to create the downstream patch. // By default, this field is empty and the downstream patch will be based off of its // most recent commit. DownstreamRevision *string `json:"downstream_revision,omitempty"` // The list of variants/tasks from the alias that will run in the downstream // project. VariantsTasks []VariantTask `json:"variants_tasks,omitempty"` }
func (*APIPatchTriggerDefinition) BuildFromService ¶
func (t *APIPatchTriggerDefinition) BuildFromService(def patch.PatchTriggerDefinition) error
func (*APIPatchTriggerDefinition) ToService ¶
func (t *APIPatchTriggerDefinition) ToService() patch.PatchTriggerDefinition
type APIPeriodicBuildDefinition ¶
type APIPeriodicBuildDefinition struct { // Identifier for the periodic build. ID *string `json:"id"` // Project config file to use for the periodic build. ConfigFile *string `json:"config_file"` // Interval (in hours) between periodic build runs. IntervalHours *int `json:"interval_hours"` // Cron specification for when to run periodic builds. Cron *string `json:"cron"` // Alias to run for the periodic build. Alias *string `json:"alias,omitempty"` // Message to display in the version metadata. Message *string `json:"message,omitempty"` // Next time that the periodic build will run. NextRunTime *time.Time `json:"next_run_time,omitempty"` }
func (*APIPeriodicBuildDefinition) BuildFromService ¶
func (bd *APIPeriodicBuildDefinition) BuildFromService(params model.PeriodicBuildDefinition)
func (*APIPeriodicBuildDefinition) ToService ¶
func (bd *APIPeriodicBuildDefinition) ToService() model.PeriodicBuildDefinition
type APIPermission ¶
type APIPermission struct { Key string `json:"key"` Name string `json:"name"` Levels []evergreen.PermissionLevel `json:"levels"` }
type APIPermissions ¶
type APIPermissions struct { ProjectPermissions []APIPermission `json:"projectPermissions"` DistroPermissions []APIPermission `json:"distroPermissions"` }
type APIPersistentDNSConfig ¶
type APIPersistentDNSConfig struct { HostedZoneID *string `json:"hosted_zone_id"` Domain *string `json:"domain"` }
APIPersistentDNSConfig represents configuration options for supporting persistent DNS names for hosts.
func (*APIPersistentDNSConfig) BuildFromService ¶
func (a *APIPersistentDNSConfig) BuildFromService(h interface{}) error
func (*APIPersistentDNSConfig) ToService ¶
func (a *APIPersistentDNSConfig) ToService() (interface{}, error)
type APIPlannerSettings ¶
type APIPlannerSettings struct { Version *string `json:"version"` TargetTime APIDuration `json:"target_time"` GroupVersions bool `json:"group_versions"` PatchFactor int64 `json:"patch_factor"` PatchTimeInQueueFactor int64 `json:"patch_time_in_queue_factor"` MainlineTimeInQueueFactor int64 `json:"mainline_time_in_queue_factor"` ExpectedRuntimeFactor int64 `json:"expected_runtime_factor"` GenerateTaskFactor int64 `json:"generate_task_factor"` NumDependentsFactor float64 `json:"num_dependents_factor"` CommitQueueFactor int64 `json:"commit_queue_factor"` }
func (*APIPlannerSettings) BuildFromService ¶
func (s *APIPlannerSettings) BuildFromService(settings distro.PlannerSettings)
BuildFromService converts from service level distro.PlannerSetting to an APIPlannerSettings
func (*APIPlannerSettings) ToService ¶
func (s *APIPlannerSettings) ToService() distro.PlannerSettings
ToService returns a service layer distro.PlannerSettings using the data from APIPlannerSettings
type APIPod ¶
type APIPod struct { ID *string `json:"id"` Type APIPodType `json:"type,omitempty"` Status APIPodStatus `json:"status,omitempty"` TaskContainerCreationOpts APIPodTaskContainerCreationOptions `json:"task_container_creation_opts,omitempty"` Family *string `json:"family,omitempty"` TimeInfo APIPodTimeInfo `json:"time_info,omitempty"` Resources APIPodResourceInfo `json:"resources,omitempty"` TaskRuntimeInfo APITaskRuntimeInfo `json:"task_runtime_info,omitempty"` AgentVersion *string `json:"agent_version,omitempty"` }
APIPod represents a pod to be used and returned from the REST API.
func (*APIPod) BuildFromService ¶
BuildFromService converts a service-layer pod model into a REST API model.
type APIPodArch ¶
type APIPodArch string
func (*APIPodArch) BuildFromService ¶
func (a *APIPodArch) BuildFromService(dbArch *pod.Arch)
type APIPodLifecycleConfig ¶
type APIPodLifecycleConfig struct { MaxParallelPodRequests int `json:"max_parallel_pod_requests"` MaxPodDefinitionCleanupRate int `json:"max_pod_definition_cleanup_rate"` MaxSecretCleanupRate int `json:"max_secret_cleanup_rate"` }
func (*APIPodLifecycleConfig) BuildFromService ¶
func (a *APIPodLifecycleConfig) BuildFromService(h interface{}) error
func (*APIPodLifecycleConfig) ToService ¶
func (a *APIPodLifecycleConfig) ToService() (interface{}, error)
type APIPodResourceInfo ¶
type APIPodResourceInfo struct { ExternalID *string `json:"external_id,omitempty"` DefinitionID *string `json:"definition_id,omitempty"` Cluster *string `json:"cluster,omitempty"` Containers []APIContainerResourceInfo `json:"containers,omitempty"` }
APIPodResourceInfo represents information about external resources associated with a pod.
func (*APIPodResourceInfo) BuildFromService ¶
func (i *APIPodResourceInfo) BuildFromService(info pod.ResourceInfo)
BuildFromService converts service-layer pod resource information into REST API pod resource information.
func (*APIPodResourceInfo) ToService ¶
func (i *APIPodResourceInfo) ToService() pod.ResourceInfo
ToService converts REST API pod resource information into service-layer pod resource information.
type APIPodSecret ¶
type APIPodSecret struct { ExternalID *string `json:"external_id,omitempty"` Value *string `json:"value,omitempty"` }
APIPodSecret represents a secret associated with a pod returned from the REST API.
func (*APIPodSecret) BuildFromService ¶
func (s *APIPodSecret) BuildFromService(secret pod.Secret)
BuildFromService converts a service-layer pod secret into a REST API pod secret.
func (*APIPodSecret) ToService ¶
func (s *APIPodSecret) ToService() pod.Secret
ToService converts a REST API pod secret into a service-layer pod secret.
type APIPodStatus ¶
type APIPodStatus string
APIPodStatus represents a pod's status.
const ( PodStatusInitializing APIPodStatus = "initializing" PodStatusStarting APIPodStatus = "starting" PodStatusRunning APIPodStatus = "running" PodStatusDecommissioned APIPodStatus = "decommissioned" PodStatusTerminated APIPodStatus = "terminated" )
func (*APIPodStatus) BuildFromService ¶
func (s *APIPodStatus) BuildFromService(ps pod.Status) error
BuildFromService converts a service-layer pod status into a REST API pod status.
type APIPodTaskContainerCreationOptions ¶
type APIPodTaskContainerCreationOptions struct { Image *string `json:"image,omitempty"` RepoCredsExternalID *string `json:"repo_creds_external_id,omitempty"` MemoryMB *int `json:"memory_mb,omitempty"` CPU *int `json:"cpu,omitempty"` OS APIPodOS `json:"os,omitempty"` Arch APIPodArch `json:"arch,omitempty"` WindowsVersion APIPodWindowsVersion `json:"windows_version,omitempty"` EnvVars map[string]string `json:"env_vars,omitempty"` EnvSecrets map[string]APIPodSecret `json:"env_secrets,omitempty"` WorkingDir *string `json:"working_dir,omitempty"` }
APIPodTaskContainerCreationOptions represents options to apply to the task's container when creating a pod.
func (*APIPodTaskContainerCreationOptions) BuildFromService ¶
func (o *APIPodTaskContainerCreationOptions) BuildFromService(opts pod.TaskContainerCreationOptions)
BuildFromService converts service-layer task container creation options into REST API task container creation options.
func (*APIPodTaskContainerCreationOptions) ToService ¶
func (o *APIPodTaskContainerCreationOptions) ToService() (*pod.TaskContainerCreationOptions, error)
ToService converts REST API task container creation options into service-layer task container creation options.
type APIPodTimeInfo ¶
type APIPodTimeInfo struct { Initializing *time.Time `json:"initializing,omitempty"` Starting *time.Time `json:"starting,omitempty"` LastCommunicated *time.Time `json:"last_communicated,omitempty"` }
APIPodResourceInfo represents timing information about the pod lifecycle.
func (*APIPodTimeInfo) BuildFromService ¶
func (i *APIPodTimeInfo) BuildFromService(info pod.TimeInfo)
BuildFromService converts service-layer resource information into REST API timing information.
func (*APIPodTimeInfo) ToService ¶
func (i *APIPodTimeInfo) ToService() pod.TimeInfo
BuildFromService converts service-layer resource information into REST API timing information.
type APIPodType ¶
type APIPodType string
APIPodType represents a pod's type.
const (
PodTypeAgent APIPodType = "agent"
)
func (*APIPodType) BuildFromService ¶
func (t *APIPodType) BuildFromService(pt pod.Type) error
BuildFromService converts a service-layer pod type into a REST API pod type.
type APIPodWindowsVersion ¶
type APIPodWindowsVersion string
func (*APIPodWindowsVersion) BuildFromService ¶
func (v *APIPodWindowsVersion) BuildFromService(dbWinVer *pod.WindowsVersion)
func (*APIPodWindowsVersion) ToService ¶
func (v *APIPodWindowsVersion) ToService() (*pod.WindowsVersion, error)
type APIPreconditionScript ¶
APIPreconditionScript is the model used by the API to represent a distro.PreconditionScript.
func (*APIPreconditionScript) BuildFromService ¶
func (s *APIPreconditionScript) BuildFromService(script distro.PreconditionScript)
BuildFromService converts a service-level distro.PreconditionScript to an APIPreconditionScript.
func (*APIPreconditionScript) ToService ¶
func (s *APIPreconditionScript) ToService() distro.PreconditionScript
ToService returns a service-level distro.PreconditionScript using the data from the APIPreconditionScript.
type APIProjectAlias ¶
type APIProjectAlias struct { // Name of the alias. Alias *string `json:"alias"` // Regex for matching git tags to run git tag versions. GitTag *string `json:"git_tag"` // Regex for build variants to match. Variant *string `json:"variant"` // Human-friendly description for the alias. Description *string `json:"description"` // Regex for tasks to match. Task *string `json:"task"` // Path to project config file to use. RemotePath *string `json:"remote_path"` // Build variant tags selectors to match. VariantTags []*string `json:"variant_tags,omitempty"` // Task tag selectors to match. TaskTags []*string `json:"tags,omitempty"` // If set, deletes the project alias by name. Delete bool `json:"delete,omitempty"` // Identifier for the project alias. ID *string `json:"_id,omitempty"` // List of allowed parameters to the alias. Parameters []*APIParameter `json:"parameters,omitempty"` }
func (*APIProjectAlias) BuildFromService ¶
func (a *APIProjectAlias) BuildFromService(in model.ProjectAlias)
func (*APIProjectAlias) ToService ¶
func (a *APIProjectAlias) ToService() model.ProjectAlias
type APIProjectBanner ¶
type APIProjectBanner struct { // Banner theme. Theme evergreen.BannerTheme `json:"theme"` // Banner text. Text *string `json:"text"` }
func (*APIProjectBanner) BuildFromService ¶
func (t *APIProjectBanner) BuildFromService(h model.ProjectBanner)
func (*APIProjectBanner) ToService ¶
func (t *APIProjectBanner) ToService() model.ProjectBanner
type APIProjectCreationConfig ¶
type APIProjectCreationConfig struct { TotalProjectLimit int `json:"total_project_limit"` RepoProjectLimit int `json:"repo_project_limit"` RepoExceptions []APIOwnerRepo `json:"repo_exceptions"` JiraProject string `json:"jira_project"` }
func (*APIProjectCreationConfig) BuildFromService ¶
func (a *APIProjectCreationConfig) BuildFromService(h interface{}) error
func (*APIProjectCreationConfig) ToService ¶
func (a *APIProjectCreationConfig) ToService() (interface{}, error)
type APIProjectEvent ¶
type APIProjectEvent struct { Timestamp *time.Time `json:"ts"` User *string `json:"user"` Before APIProjectEventSettings `json:"before"` After APIProjectEventSettings `json:"after"` }
func (*APIProjectEvent) BuildFromService ¶
func (e *APIProjectEvent) BuildFromService(entry model.ProjectChangeEventEntry) error
func (*APIProjectEvent) ToService ¶
func (e *APIProjectEvent) ToService() (interface{}, error)
type APIProjectEventSettings ¶
type APIProjectEventSettings struct { Id *string `json:"id"` ProjectRef APIProjectRef `json:"proj_ref"` GithubAppAuth APIGithubAppAuth `json:"github_app_auth"` GithubWebhooksEnabled bool `json:"github_webhooks_enabled"` Vars APIProjectVars `json:"vars"` Aliases []APIProjectAlias `json:"aliases"` Subscriptions []APISubscription `json:"subscriptions"` }
take this from the original place instead of redefinning it here
type APIProjectRef ¶
type APIProjectRef struct { Id *string `json:"id"` // Owner of project repository. Owner *string `json:"owner_name"` // Repository name. Repo *string `json:"repo_name"` // Name of tracking branch. Branch *string `json:"branch_name"` // Whether evergreen is enabled for this project. Enabled *bool `json:"enabled"` // Time interval between commits for Evergreen to activate. BatchTime int `json:"batch_time"` // Path to config file in repo. RemotePath *string `json:"remote_path"` // Oldest allowed merge base for PR patches OldestAllowedMergeBase *string `json:"oldest_allowed_merge_base"` // File path to script that users can run on spawn hosts loaded with task // data. SpawnHostScriptPath *string `json:"spawn_host_script_path"` // Internal evergreen identifier for project. Identifier *string `json:"identifier"` // Project name displayed to users. DisplayName *string `json:"display_name"` // List of identifiers of tasks used in this patch. DeactivatePrevious *bool `json:"deactivate_previous"` // If true, repotracker is run on github push events. If false, repotracker is run periodically every few minutes. TracksPushEvents *bool `json:"tracks_push_events"` // Enable GitHub automated pull request testing. PRTestingEnabled *bool `json:"pr_testing_enabled"` // Enable GitHub manual pull request testing. ManualPRTestingEnabled *bool `json:"manual_pr_testing_enabled"` // Enable testing when git tags are pushed. GitTagVersionsEnabled *bool `json:"git_tag_versions_enabled"` // Enable GitHub checks. GithubChecksEnabled *bool `json:"github_checks_enabled"` // Whether or not to default to using repo settings. UseRepoSettings *bool `json:"use_repo_settings"` // Identifier of the attached repo ref. Cannot be modified by users. RepoRefId *string `json:"repo_ref_id"` // Options for commit queue. CommitQueue APICommitQueueParams `json:"commit_queue"` // Options for task sync. TaskSync APITaskSyncOptions `json:"task_sync"` // Options for task annotations. TaskAnnotationSettings APITaskAnnotationSettings `json:"task_annotation_settings"` // Options for Build Baron. BuildBaronSettings APIBuildBaronSettings `json:"build_baron_settings"` // Enable the performance plugin. PerfEnabled *bool `json:"perf_enabled"` // Whether or not the project can be seen in the UI. Cannot be modified by // users. Hidden *bool `json:"hidden"` // Disable patching. PatchingDisabled *bool `json:"patching_disabled"` // Disable the repotracker. RepotrackerDisabled *bool `json:"repotracker_disabled"` // Error from the repotracker, if any. Cannot be modified by users. RepotrackerError *APIRepositoryErrorDetails `json:"repotracker_error"` // Disable task dispatching. DispatchingDisabled *bool `json:"dispatching_disabled"` // Disable stepback. StepbackDisabled *bool `json:"stepback_disabled"` // Use bisect stepback instead of linear. StepbackBisect *bool `json:"stepback_bisect"` // Enable setting project aliases from version-controlled project configs. VersionControlEnabled *bool `json:"version_control_enabled"` // Disable stats caching. DisabledStatsCache *bool `json:"disabled_stats_cache"` // Usernames of project admins. Can be null for some projects (EVG-6598). Admins []*string `json:"admins"` // Usernames of project admins to remove. DeleteAdmins []*string `json:"delete_admins,omitempty"` // Usernames authorized to submit git tag versions. GitTagAuthorizedUsers []*string `json:"git_tag_authorized_users" bson:"git_tag_authorized_users"` // Usernames of git tag-authorized users to remove. DeleteGitTagAuthorizedUsers []*string `json:"delete_git_tag_authorized_users,omitempty" bson:"delete_git_tag_authorized_users,omitempty"` // Names of GitHub teams authorized to submit git tag versions. GitTagAuthorizedTeams []*string `json:"git_tag_authorized_teams" bson:"git_tag_authorized_teams"` // Names of GitHub teams authorized to submit git tag versions to remove. DeleteGitTagAuthorizedTeams []*string `json:"delete_git_tag_authorized_teams,omitempty" bson:"delete_git_tag_authorized_teams,omitempty"` // Notify original committer (or admins) when build fails. NotifyOnBuildFailure *bool `json:"notify_on_failure"` // Prevent users from being able to view this project unless explicitly // granted access. Restricted *bool `json:"restricted"` // Only used when modifying projects to change the base revision and run the repotracker. Revision *string `json:"revision"` // List of triggers for the project. Triggers []APITriggerDefinition `json:"triggers"` // List of GitHub trigger aliases. GithubTriggerAliases []*string `json:"github_trigger_aliases"` // List of patch trigger aliases. PatchTriggerAliases []APIPatchTriggerDefinition `json:"patch_trigger_aliases"` // List of aliases for the project. Aliases []APIProjectAlias `json:"aliases"` // Project variables information Variables APIProjectVars `json:"variables"` // Options for workstations. WorkstationConfig APIWorkstationConfig `json:"workstation_config"` // List of subscriptions for the project. Subscriptions []APISubscription `json:"subscriptions"` // IDs of subscriptions to delete. DeleteSubscriptions []*string `json:"delete_subscriptions,omitempty"` // List of periodic build definitions. PeriodicBuilds []APIPeriodicBuildDefinition `json:"periodic_builds,omitempty"` // List of container size definitions ContainerSizeDefinitions []APIContainerResources `json:"container_size_definitions"` // List of container secrets. ContainerSecrets []APIContainerSecret `json:"container_secrets,omitempty"` // Names of container secrets to be deleted. DeleteContainerSecrets []string `json:"delete_container_secrets,omitempty"` // List of external links in the version metadata. ExternalLinks []APIExternalLink `json:"external_links"` // Options for banner to display for the project. Banner APIProjectBanner `json:"banner"` // List of custom Parsley filters. ParsleyFilters []APIParsleyFilter `json:"parsley_filters"` // Default project health view. ProjectHealthView model.ProjectHealthView `json:"project_health_view"` // List of GitHub permission groups. GitHubDynamicTokenPermissionGroups []APIGitHubDynamicTokenPermissionGroup `json:"github_dynamic_token_permission_groups,omitempty"` // GitHub permission group by requester. GitHubPermissionGroupByRequester map[string]string `json:"github_permission_group_by_requester,omitempty"` }
func (*APIProjectRef) BuildFromService ¶
func (p *APIProjectRef) BuildFromService(projectRef model.ProjectRef) error
func (*APIProjectRef) BuildPublicFields ¶
func (p *APIProjectRef) BuildPublicFields(projectRef model.ProjectRef) error
BuildPublicFields only builds the fields that anyone should be able to see so that we can return these to non project admins.
func (*APIProjectRef) DefaultUnsetBooleans ¶
func (pRef *APIProjectRef) DefaultUnsetBooleans()
DefaultUnsetBooleans is used to set booleans to their default value.
func (*APIProjectRef) ToService ¶
func (p *APIProjectRef) ToService() (*model.ProjectRef, error)
ToService returns a service layer ProjectRef using the data from APIProjectRef
type APIProjectSettings ¶
type APIProjectSettings struct { Id *string `json:"id"` ProjectRef APIProjectRef `json:"proj_ref"` GithubAppAuth APIGithubAppAuth `json:"github_app_auth"` GithubWebhooksEnabled bool `json:"github_webhooks_enabled"` Vars APIProjectVars `json:"vars"` Aliases []APIProjectAlias `json:"aliases"` Subscriptions []APISubscription `json:"subscriptions"` }
func DbProjectSettingsToRestModel ¶
func DbProjectSettingsToRestModel(settings model.ProjectSettings) (APIProjectSettings, error)
type APIProjectVars ¶
type APIProjectVars struct { // Regular project variable names and their values. Vars map[string]string `json:"vars"` // Private variable names. PrivateVars map[string]bool `json:"private_vars"` // Admin-only variable names. AdminOnlyVars map[string]bool `json:"admin_only_vars"` // Names of project variables to delete. VarsToDelete []string `json:"vars_to_delete,omitempty"` // to use for the UI PrivateVarsList []string `json:"-"` AdminOnlyVarsList []string `json:"-"` }
func (*APIProjectVars) BuildFromService ¶
func (p *APIProjectVars) BuildFromService(v model.ProjectVars)
func (*APIProjectVars) IsPrivate ¶
func (vars *APIProjectVars) IsPrivate(key string) bool
IsPrivate returns true if the given key is a private variable.
func (*APIProjectVars) ToService ¶
func (p *APIProjectVars) ToService() *model.ProjectVars
type APIProvisionOptions ¶
type APIProvisionOptions struct { // ID of the task that the host was spawned from. TaskID *string `json:"task_id"` }
APIProvisionOptions contains options for spawn hosts.
func (*APIProvisionOptions) BuildFromService ¶
func (apiOpts *APIProvisionOptions) BuildFromService(opts host.ProvisionOptions)
type APIPubKey ¶
func (*APIPubKey) BuildFromService ¶
BuildFromService converts from service level structs to an APIPubKey.
type APIQuestionAnswer ¶
type APIQuestionAnswer struct { ID *string `json:"id"` Prompt *string `json:"prompt"` Answer *string `json:"answer"` }
func (*APIQuestionAnswer) ToService ¶
func (a *APIQuestionAnswer) ToService() model.QuestionAnswer
type APIRawModule ¶
type APIRawModule struct { // The module name Name string `json:"name"` // The module diff Diff string `json:"diff"` // The githash for the module Githash string `json:"githash"` }
APIRawModule contains a module diff.
type APIRawPatch ¶
type APIRawPatch struct { // The main patch Patch APIRawModule `json:"patch"` // The list of module diffs RawModules []APIRawModule `json:"raw_modules"` }
APIRawPatch contains a patch diff along with its module diffs.
type APIRecentTaskStats ¶
type APIRecentTaskStats struct { Total int `json:"total"` Inactive int `json:"inactive"` Unstarted int `json:"unstarted"` Started int `json:"started"` Succeeded int `json:"succeeded"` Failed int `json:"failed"` SystemFailed int `json:"system-failed"` SetupFailed int `json:"setup-failed"` SystemUnresponsive int `json:"system-unresponsive"` SystemTimedOut int `json:"system-timed-out"` TestTimedOut int `json:"test-timed-out"` }
APIRecentTaskStats is the model to be returned by the API whenever recent tasks are fetched.
func (*APIRecentTaskStats) BuildFromService ¶
func (ts *APIRecentTaskStats) BuildFromService(rc task.ResultCounts)
BuildFromService converts from service level structs to an APIRecentTaskStats.
type APIRecentTaskStatsList ¶
func (*APIRecentTaskStatsList) BuildFromService ¶
func (s *APIRecentTaskStatsList) BuildFromService(statsMap map[string][]task.Stat)
type APIRepoTrackerConfig ¶
type APIRepoTrackerConfig struct { NumNewRepoRevisionsToFetch int `json:"revs_to_fetch"` MaxRepoRevisionsToSearch int `json:"max_revs_to_search"` MaxConcurrentRequests int `json:"max_con_requests"` }
func (*APIRepoTrackerConfig) BuildFromService ¶
func (a *APIRepoTrackerConfig) BuildFromService(h interface{}) error
func (*APIRepoTrackerConfig) ToService ¶
func (a *APIRepoTrackerConfig) ToService() (interface{}, error)
type APIRepositoryErrorDetails ¶
type APIRepositoryErrorDetails struct { Exists *bool `json:"exists"` InvalidRevision *string `json:"invalid_revision"` MergeBaseRevision *string `json:"merge_base_revision"` }
func (*APIRepositoryErrorDetails) BuildFromService ¶
func (t *APIRepositoryErrorDetails) BuildFromService(h model.RepositoryErrorDetails)
type APIResourceLimits ¶
type APIRuntimeEnvironmentsConfig ¶
type APIRuntimeEnvironmentsConfig struct { BaseURL *string `json:"base_url"` APIKey *string `json:"api_key"` }
func (*APIRuntimeEnvironmentsConfig) BuildFromService ¶
func (a *APIRuntimeEnvironmentsConfig) BuildFromService(h interface{}) error
func (*APIRuntimeEnvironmentsConfig) ToService ¶
func (a *APIRuntimeEnvironmentsConfig) ToService() (interface{}, error)
type APIS3Credentials ¶
type APIS3Credentials struct { Key *string `json:"key"` Secret *string `json:"secret"` Bucket *string `json:"bucket"` }
func (*APIS3Credentials) BuildFromService ¶
func (a *APIS3Credentials) BuildFromService(h interface{}) error
func (*APIS3Credentials) ToService ¶
func (a *APIS3Credentials) ToService() (interface{}, error)
type APISESConfig ¶
type APISESConfig struct {
SenderAddress *string `json:"sender_address"`
}
func (*APISESConfig) BuildFromService ¶
func (a *APISESConfig) BuildFromService(h interface{}) error
func (*APISESConfig) ToService ¶
func (a *APISESConfig) ToService() (interface{}, error)
type APISSHKeyPair ¶
type APISchedulerConfig ¶
type APISchedulerConfig struct { TaskFinder *string `json:"task_finder"` HostAllocator *string `json:"host_allocator"` HostAllocatorRoundingRule *string `json:"host_allocator_rounding_rule"` HostAllocatorFeedbackRule *string `json:"host_allocator_feedback_rule"` HostsOverallocatedRule *string `json:"hosts_overallocated_rule"` FutureHostFraction float64 `json:"free_host_fraction"` CacheDurationSeconds int `json:"cache_duration_seconds"` Planner *string `json:"planner"` TargetTimeSeconds int `json:"target_time_seconds"` AcceptableHostIdleTimeSeconds int `json:"acceptable_host_idle_time_seconds"` GroupVersions bool `json:"group_versions"` PatchFactor int64 `json:"patch_factor"` PatchTimeInQueueFactor int64 `json:"patch_time_in_queue_factor"` CommitQueueFactor int64 `json:"commit_queue_factor"` MainlineTimeInQueueFactor int64 `json:"mainline_time_in_queue_factor"` ExpectedRuntimeFactor int64 `json:"expected_runtime_factor"` GenerateTaskFactor int64 `json:"generate_task_factor"` NumDependentsFactor float64 `json:"num_dependents_factor"` StepbackTaskFactor int64 `json:"stepback_task_factor"` }
func (*APISchedulerConfig) BuildFromService ¶
func (a *APISchedulerConfig) BuildFromService(h interface{}) error
func (*APISchedulerConfig) ToService ¶
func (a *APISchedulerConfig) ToService() (interface{}, error)
type APISecretsManagerConfig ¶
type APISecretsManagerConfig struct {
SecretPrefix *string `json:"secret_prefix"`
}
APISecretsManagerConfig represents configuration options for AWS Secrets Manager.
func (*APISecretsManagerConfig) BuildFromService ¶
func (a *APISecretsManagerConfig) BuildFromService(conf evergreen.SecretsManagerConfig)
func (*APISecretsManagerConfig) ToService ¶
func (a *APISecretsManagerConfig) ToService() evergreen.SecretsManagerConfig
type APISelector ¶
func (*APISelector) BuildFromService ¶
func (s *APISelector) BuildFromService(selector event.Selector)
func (*APISelector) ToService ¶
func (s *APISelector) ToService() event.Selector
type APIServiceFlags ¶
type APIServiceFlags struct { TaskDispatchDisabled bool `json:"task_dispatch_disabled"` HostInitDisabled bool `json:"host_init_disabled"` PodInitDisabled bool `json:"pod_init_disabled"` LargeParserProjectsDisabled bool `json:"large_parser_projects_disabled"` MonitorDisabled bool `json:"monitor_disabled"` AlertsDisabled bool `json:"alerts_disabled"` AgentStartDisabled bool `json:"agent_start_disabled"` RepotrackerDisabled bool `json:"repotracker_disabled"` SchedulerDisabled bool `json:"scheduler_disabled"` CheckBlockedTasksDisabled bool `json:"check_blocked_tasks_disabled"` GithubPRTestingDisabled bool `json:"github_pr_testing_disabled"` CLIUpdatesDisabled bool `json:"cli_updates_disabled"` BackgroundStatsDisabled bool `json:"background_stats_disabled"` TaskLoggingDisabled bool `json:"task_logging_disabled"` CacheStatsJobDisabled bool `json:"cache_stats_job_disabled"` CacheStatsEndpointDisabled bool `json:"cache_stats_endpoint_disabled"` TaskReliabilityDisabled bool `json:"task_reliability_disabled"` CommitQueueDisabled bool `json:"commit_queue_disabled"` HostAllocatorDisabled bool `json:"host_allocator_disabled"` PodAllocatorDisabled bool `json:"pod_allocator_disabled"` UnrecognizedPodCleanupDisabled bool `json:"unrecognized_pod_cleanup_disabled"` BackgroundReauthDisabled bool `json:"background_reauth_disabled"` BackgroundCleanupDisabled bool `json:"background_cleanup_disabled"` CloudCleanupDisabled bool `json:"cloud_cleanup_disabled"` GlobalGitHubTokenDisabled bool `json:"global_github_token_disabled"` SleepScheduleDisabled bool `json:"sleep_schedule_disabled"` SystemFailedTaskRestartDisabled bool `json:"system_failed_task_restart_disabled"` DegradedModeDisabled bool `json:"cpu_degraded_mode_disabled"` ParameterStoreDisabled bool `json:"parameter_store_disabled"` // Notifications Flags EventProcessingDisabled bool `json:"event_processing_disabled"` JIRANotificationsDisabled bool `json:"jira_notifications_disabled"` SlackNotificationsDisabled bool `json:"slack_notifications_disabled"` EmailNotificationsDisabled bool `json:"email_notifications_disabled"` WebhookNotificationsDisabled bool `json:"webhook_notifications_disabled"` GithubStatusAPIDisabled bool `json:"github_status_api_disabled"` }
APIServiceFlags is a public structure representing the admin service flags
func (*APIServiceFlags) BuildFromService ¶
func (as *APIServiceFlags) BuildFromService(h interface{}) error
BuildFromService builds a model from the service layer
func (*APIServiceFlags) ToService ¶
func (as *APIServiceFlags) ToService() (interface{}, error)
ToService returns a service model from an API model
type APISlack ¶
type APISlack struct { Target *string `json:"target"` Msg *string `json:"msg"` Attachments []APISlackAttachment `json:"attachments"` }
type APISlackAttachment ¶
type APISlackAttachment struct { Color *string `json:"color"` Fallback *string `json:"fallback"` AuthorName *string `json:"author_name"` AuthorIcon *string `json:"author_icon"` Title *string `json:"title"` TitleLink *string `json:"title_link"` Text *string `json:"text"` Fields []APISlackAttachmentField `json:"fields"` MarkdownIn []string `json:"mrkdwn_in"` }
func (*APISlackAttachment) BuildFromService ¶
func (a *APISlackAttachment) BuildFromService(attachment message.SlackAttachment)
BuildFromService converts from service level message.SlackAttachment to APISlackAttachment.
func (*APISlackAttachment) ToService ¶
func (a *APISlackAttachment) ToService() message.SlackAttachment
ToService returns a service layer message.SlackAttachment using the data from APISlackAttachment.
type APISlackAttachmentField ¶
type APISlackAttachmentField struct { Title *string `json:"title"` Value *string `json:"value"` Short bool `json:"short"` }
func (*APISlackAttachmentField) BuildFromService ¶
func (f *APISlackAttachmentField) BuildFromService(field message.SlackAttachmentField)
BuildFromService converts from service level message.SlackAttachmentField to an APISlackAttachmentField.
func (*APISlackAttachmentField) ToService ¶
func (f *APISlackAttachmentField) ToService() message.SlackAttachmentField
ToService returns a service layer message.SlackAttachmentField using the data from APISlackAttachmentField.
type APISlackConfig ¶
type APISlackConfig struct { Options *APISlackOptions `json:"options"` Token *string `json:"token"` Level *string `json:"level"` Name *string `json:"name"` }
func (*APISlackConfig) BuildFromService ¶
func (a *APISlackConfig) BuildFromService(h interface{}) error
func (*APISlackConfig) ToService ¶
func (a *APISlackConfig) ToService() (interface{}, error)
type APISlackOptions ¶
type APISlackOptions struct { Channel *string `json:"channel"` Hostname *string `json:"hostname"` Name *string `json:"name"` Username *string `json:"username"` BasicMetadata bool `json:"add_basic_metadata"` Fields bool `json:"use_fields"` AllFields bool `json:"all_fields"` FieldsSet map[string]bool `json:"fields"` }
func (*APISlackOptions) BuildFromService ¶
func (a *APISlackOptions) BuildFromService(h interface{}) error
func (*APISlackOptions) ToService ¶
func (a *APISlackOptions) ToService() (interface{}, error)
type APISleepScheduleConfig ¶
type APISleepScheduleConfig struct {
PermanentlyExemptHosts []string `json:"permanently_exempt_hosts"`
}
func (*APISleepScheduleConfig) BuildFromService ¶
func (a *APISleepScheduleConfig) BuildFromService(h interface{}) error
func (*APISleepScheduleConfig) ToService ¶
func (a *APISleepScheduleConfig) ToService() (interface{}, error)
type APISource ¶
type APISource struct { // The author of the edit Author *string `bson:"author,omitempty" json:"author,omitempty"` // The time of the edit Time *time.Time `bson:"time,omitempty" json:"time,omitempty"` // The source of the request (api or ui) Requester *string `bson:"requester,omitempty" json:"requester,omitempty"` }
func APISourceBuildFromService ¶
func APISourceBuildFromService(t *annotations.Source) *APISource
APISourceBuildFromService takes the annotations.Source DB struct and returns the REST struct *APISource with the corresponding fields populated
type APISpawnHostConfig ¶
type APISpawnHostConfig struct { UnexpirableHostsPerUser *int `json:"unexpirable_hosts_per_user"` UnexpirableVolumesPerUser *int `json:"unexpirable_volumes_per_user"` SpawnHostsPerUser *int `json:"spawn_hosts_per_user"` }
func (*APISpawnHostConfig) BuildFromService ¶
func (c *APISpawnHostConfig) BuildFromService(h interface{}) error
func (*APISpawnHostConfig) ToService ¶
func (c *APISpawnHostConfig) ToService() (interface{}, error)
type APISpawnHostModify ¶
type APISpawnHostModify struct { Action *string `json:"action"` HostID *string `json:"host_id"` VolumeID *string `json:"volume_id"` RDPPwd *string `json:"rdp_pwd"` AddHours *string `json:"add_hours"` Expiration *time.Time `json:"expiration"` InstanceType *string `json:"instance_type"` AddTags []*string `json:"tags_to_add"` DeleteTags []*string `json:"tags_to_delete"` NewName *string `json:"new_name"` }
type APISplunkConfig ¶
type APISplunkConfig struct {
SplunkConnectionInfo *APISplunkConnectionInfo `json:"splunk_connection_info"`
}
func (*APISplunkConfig) BuildFromService ¶
func (a *APISplunkConfig) BuildFromService(h interface{}) error
func (*APISplunkConfig) ToService ¶
func (a *APISplunkConfig) ToService() (interface{}, error)
type APISplunkConnectionInfo ¶
type APISplunkConnectionInfo struct { ServerURL *string `json:"url"` Token *string `json:"token"` Channel *string `json:"channel"` }
func (*APISplunkConnectionInfo) BuildFromService ¶
func (a *APISplunkConnectionInfo) BuildFromService(s send.SplunkConnectionInfo)
func (*APISplunkConnectionInfo) ToService ¶
func (a *APISplunkConnectionInfo) ToService() send.SplunkConnectionInfo
type APIStatList ¶
type APIStatList []APIStat
func (*APIStatList) BuildFromService ¶
func (s *APIStatList) BuildFromService(tasks []task.Stat)
type APIStepbackInfo ¶
type APISubnet ¶
func (*APISubnet) BuildFromService ¶
type APISubscriber ¶
type APISubscriber struct { Type *string `json:"type"` // Target can be either a slice or a string. However, since swaggo does not // support the OpenAPI `oneOf` keyword, we set `swaggerignore` and document // the field manually in the "Fetch all projects" endpoint. Target interface{} `json:"target" swaggerignore:"true"` WebhookSubscriber *APIWebhookSubscriber `json:"-"` JiraIssueSubscriber *APIJIRAIssueSubscriber `json:"-"` }
func (*APISubscriber) BuildFromService ¶
func (s *APISubscriber) BuildFromService(in event.Subscriber) error
BuildFromService for APISubscriber needs to return an error so that we can validate the target interface type.
func (*APISubscriber) ToService ¶
func (s *APISubscriber) ToService() (event.Subscriber, error)
type APISubscription ¶
type APISubscription struct { // Identifier for the subscription. ID *string `json:"id"` // Type of resource to subscribe to. ResourceType *string `json:"resource_type"` // Type of trigger for the subscription. Trigger *string `json:"trigger"` // List of resource selectors. Selectors []APISelector `json:"selectors"` // List of resource regex selectors. RegexSelectors []APISelector `json:"regex_selectors"` // Options for the subscriber. Subscriber APISubscriber `json:"subscriber"` // Type of subscription owner. OwnerType *string `json:"owner_type"` // The subscription owner. Owner *string `json:"owner"` // Data for the particular condition that triggers the subscription. TriggerData map[string]string `json:"trigger_data,omitempty"` }
func DbProjectSubscriptionsToRestModel ¶
func DbProjectSubscriptionsToRestModel(subscriptions []event.Subscription) ([]APISubscription, error)
func (*APISubscription) BuildFromService ¶
func (s *APISubscription) BuildFromService(sub event.Subscription) error
func (*APISubscription) ToService ¶
func (s *APISubscription) ToService() (event.Subscription, error)
type APISyncAtEndOptions ¶
type APITask ¶
type APITask struct { // Unique identifier of this task Id *string `json:"task_id"` ProjectId *string `json:"project_id"` ProjectIdentifier *string `json:"project_identifier"` // Time that this task was first created CreateTime *time.Time `json:"create_time"` // Time that this time was dispatched DispatchTime *time.Time `json:"dispatch_time"` // Time that this task is scheduled to begin ScheduledTime *time.Time `json:"scheduled_time"` ContainerAllocatedTime *time.Time `json:"container_allocated_time"` // Time that this task began execution StartTime *time.Time `json:"start_time"` // Time that this task finished execution FinishTime *time.Time `json:"finish_time"` IngestTime *time.Time `json:"ingest_time"` ActivatedTime *time.Time `json:"activated_time"` // An identifier of this task by its project and commit hash Version *string `json:"version_id"` // The version control identifier associated with this task Revision *string `json:"revision"` // The priority of this task to be run Priority int64 `json:"priority"` // Whether the task is currently active Activated bool `json:"activated"` // The information, if any, about stepback StepbackInfo *APIStepbackInfo `json:"stepback_info"` // Identifier of the process or user that activated this task ActivatedBy *string `json:"activated_by"` ContainerAllocated bool `json:"container_allocated"` ContainerAllocationAttempts int `json:"container_allocation_attempts"` // Identifier of the build that this task is part of BuildId *string `json:"build_id"` // Identifier of the distro that this task runs on DistroId *string `json:"distro_id"` Container *string `json:"container"` ContainerOpts APIContainerOptions `json:"container_options"` // Name of the buildvariant that this task runs on BuildVariant *string `json:"build_variant"` BuildVariantDisplayName *string `json:"build_variant_display_name"` // List of task_ids of task that this task depends on before beginning DependsOn []APIDependency `json:"depends_on"` // Name of this task displayed in the UI DisplayName *string `json:"display_name"` // The ID of the host this task ran or is running on HostId *string `json:"host_id"` PodID *string `json:"pod_id,omitempty"` // The number of the execution of this particular task Execution int `json:"execution"` // For mainline commits, represents the position in the commit history of // commit this task is associated with. For patches, this represents the // number of total patches submitted by the user. Order int `json:"order"` // The current status of this task (possible values are "undispatched", // "dispatched", "started", "success", and "failed") Status *string `json:"status"` // The status of this task that is displayed in the UI (possible values are // "will-run", "unscheduled", "blocked", "dispatched", "started", "success", // "failed", "aborted", "system-failed", "system-unresponsive", // "system-timed-out", "task-timed-out") DisplayStatus *string `json:"display_status"` // Object containing additional information about the status Details ApiTaskEndDetail `json:"status_details"` // Object containing raw and event logs for this task Logs LogLinks `json:"logs"` // Object containing parsley logs for this task ParsleyLogs LogLinks `json:"parsley_logs"` // Number of milliseconds this task took during execution TimeTaken APIDuration `json:"time_taken_ms"` // Number of milliseconds expected for this task to execute ExpectedDuration APIDuration `json:"expected_duration_ms"` EstimatedStart APIDuration `json:"est_wait_to_start_ms"` // Contains previous executions of the task if they were requested, and // available. May be empty PreviousExecutions []APITask `json:"previous_executions,omitempty"` GenerateTask bool `json:"generate_task"` GeneratedBy string `json:"generated_by"` // The list of artifacts associated with the task. Artifacts []APIFile `json:"artifacts"` DisplayOnly bool `json:"display_only"` // The ID of the task's parent display task, if requested and available ParentTaskId string `json:"parent_task_id"` ExecutionTasks []*string `json:"execution_tasks,omitempty"` // List of tags defined for the task, if any Tags []*string `json:"tags,omitempty"` Mainline bool `json:"mainline"` TaskGroup string `json:"task_group,omitempty"` TaskGroupMaxHosts int `json:"task_group_max_hosts,omitempty"` Blocked bool `json:"blocked"` // Version created by one of patch_request", "github_pull_request", // "gitter_request" (caused by git commit, aka the repotracker requester), // "trigger_request" (Project Trigger versions) , "merge_test" (commit queue // patches), "ad_hoc" (periodic builds) Requester *string `json:"requester"` TestResults []APITest `json:"test_results"` Aborted bool `json:"aborted"` AbortInfo APIAbortInfo `json:"abort_info,omitempty"` CanSync bool `json:"can_sync,omitempty"` SyncAtEndOpts APISyncAtEndOptions `json:"sync_at_end_opts"` AMI *string `json:"ami"` MustHaveResults bool `json:"must_have_test_results"` BaseTask APIBaseTaskInfo `json:"base_task"` ResetWhenFinished bool `json:"reset_when_finished"` // These fields are used by graphql gen, but do not need to be exposed // via Evergreen's user-facing API. OverrideDependencies bool `json:"-"` Archived bool `json:"archived"` ResultsService string `json:"-"` HasCedarResults bool `json:"-"` ResultsFailed bool `json:"-"` }
APITask is the model to be returned by the API whenever tasks are fetched.
func (*APITask) BuildFromService ¶
BuildFromService converts from a service level task by loading the data into the appropriate fields of the APITask. It takes optional arguments to populate additional fields.
func (*APITask) BuildPreviousExecutions ¶
func (at *APITask) BuildPreviousExecutions(ctx context.Context, tasks []task.Task, logURL, parsleyURL string) error
BuildPreviousExecutions adds the given previous executions to the given API task.
func (*APITask) GetProjectIdentifier ¶
func (at *APITask) GetProjectIdentifier()
type APITaskAnnotation ¶
type APITaskAnnotation struct { Id *string `bson:"_id" json:"id"` // Identifier of the task that this annotation is for TaskId *string `bson:"task_id" json:"task_id"` // The number of the execution of the task that the annotation is for TaskExecution *int `bson:"task_execution" json:"task_execution"` // Structured data about the task. Since this is user-given json data, the structure can differ between annotations Metadata *birch.Document `bson:"metadata,omitempty" json:"metadata,omitempty" swaggertype:"object"` // Comment about the task failure Note *APINote `bson:"note,omitempty" json:"note,omitempty"` // Links to tickets definitely related Issues []APIIssueLink `bson:"issues,omitempty" json:"issues,omitempty"` // Links to tickets possibly related SuspectedIssues []APIIssueLink `bson:"suspected_issues,omitempty" json:"suspected_issues,omitempty"` CreatedIssues []APIIssueLink `bson:"created_issues,omitempty" json:"created_issues,omitempty"` // List of links associated with a task, to be displayed in the task metadata sidebar, currently limited to 1 MetadataLinks []APIMetadataLink `bson:"metadata_links,omitempty" json:"metadata_links,omitempty"` }
func APITaskAnnotationBuildFromService ¶
func APITaskAnnotationBuildFromService(t annotations.TaskAnnotation) *APITaskAnnotation
APITaskAnnotationBuildFromService takes the annotations.TaskAnnotation DB struct and returns the REST struct *APITaskAnnotation with the corresponding fields populated
type APITaskAnnotationSettings ¶
type APITaskAnnotationSettings struct { // Options for webhooks. FileTicketWebhook APIWebHook `bson:"web_hook" json:"web_hook"` }
func (*APITaskAnnotationSettings) BuildFromService ¶
func (ta *APITaskAnnotationSettings) BuildFromService(config evergreen.AnnotationsSettings)
func (*APITaskAnnotationSettings) ToService ¶
func (ta *APITaskAnnotationSettings) ToService() evergreen.AnnotationsSettings
type APITaskArgs ¶
type APITaskCache ¶
type APITaskCache struct { Id string `json:"id"` DisplayName string `json:"display_name"` Status string `json:"status"` StatusDetails apimodels.TaskEndDetail `json:"task_end_details"` StartTime *time.Time `json:"start_time"` TimeTaken time.Duration `json:"time_taken" swaggertype:"primitive,integer"` TimeTakenMS APIDuration `json:"time_taken_ms"` Activated bool `json:"activated"` FailedTestNames []string `json:"failed_test_names,omitempty"` }
type APITaskLimitsConfig ¶
type APITaskLimitsConfig struct { // MaxTasksPerVersion is the maximum number of tasks that a single version // can have. MaxTasksPerVersion *int `json:"max_tasks_per_version"` // MaxIncludesPerVersion is the maximum number of includes that a single // version can have. MaxIncludesPerVersion *int `json:"max_includes_per_version"` // MaxHourlyPatchTasks is the maximum number of patch tasks a single user can // schedule per hour. MaxHourlyPatchTasks *int `json:"max_hourly_patch_tasks"` // MaxPendingGeneratedTasks is the maximum number of tasks that can be created // by all generated task at once. MaxPendingGeneratedTasks *int `json:"max_pending_generated_tasks"` // MaxGenerateTaskJSONSize is the maximum size of a JSON file in MB that can be specified in the GenerateTasks command. MaxGenerateTaskJSONSize *int `json:"max_generate_task_json_size"` // MaxConcurrentLargeParserProjectTasks is the maximum number of tasks with parser projects stored in S3 that can be running at once. MaxConcurrentLargeParserProjectTasks *int `json:"max_concurrent_large_parser_project_tasks"` // MaxDegradedModeConcurrentLargeParserProjectTasks is the maximum number of tasks with parser projects stored in S3 that can be running at once during CPU degraded mode. MaxDegradedModeConcurrentLargeParserProjectTasks *int `json:"max_degraded_mode_concurrent_large_parser_project_tasks"` // MaxDegradedModeParserProjectSize is the maximum parser project size in MB during CPU degraded mode. MaxDegradedModeParserProjectSize *int `json:"max_degraded_mode_parser_project_size"` // MaxParserProjectSize is the maximum allowed size in MB for parser projects that are stored in S3. MaxParserProjectSize *int `json:"max_parser_project_size"` // MaxExecTimeoutSecs is the maximum number of seconds a task can run and set their timeout to. MaxExecTimeoutSecs *int `json:"max_exec_timeout_secs"` // MaxTaskExecution is the maximum task (zero based) execution number. MaxTaskExecution *int `json:"max_task_execution"` // MaxDailyAutomaticRestarts is the maximum number of times a project can automatically restart a task within a 24-hour period. MaxDailyAutomaticRestarts *int `json:"max_daily_automatic_restarts"` }
func (*APITaskLimitsConfig) BuildFromService ¶
func (c *APITaskLimitsConfig) BuildFromService(h interface{}) error
func (*APITaskLimitsConfig) ToService ¶
func (c *APITaskLimitsConfig) ToService() (interface{}, error)
type APITaskQueueItem ¶
type APITaskQueueItem struct { Id *string `json:"id"` DisplayName *string `json:"display_name"` BuildVariant *string `json:"build_variant"` RevisionOrderNumber int `json:"order"` Requester *string `json:"requester"` Revision *string `json:"gitspec"` Project *string `json:"project"` ProjectIdentifier *string `json:"project_identifier,omitempty"` Version *string `json:"version"` Build *string `json:"build"` ExpectedDuration APIDuration `json:"exp_dur"` Priority int64 `json:"priority"` ActivatedBy *string `json:"activated_by"` }
func (*APITaskQueueItem) BuildFromService ¶
func (s *APITaskQueueItem) BuildFromService(tqi model.TaskQueueItem)
type APITaskReliability ¶
type APITaskReliability struct { TaskName *string `json:"task_name"` BuildVariant *string `json:"variant,omitempty"` Distro *string `json:"distro,omitempty"` Date *string `json:"date"` NumSuccess int `json:"num_success"` NumFailed int `json:"num_failed"` NumTotal int `json:"num_total"` NumTimeout int `json:"num_timeout"` NumTestFailed int `json:"num_test_failed"` NumSystemFailed int `json:"num_system_failed"` NumSetupFailed int `json:"num_setup_failed"` AvgDurationSuccess float64 `json:"avg_duration_success"` SuccessRate float64 `json:"success_rate"` }
APITaskReliability is the model to be returned by the API when querying task execution statistics
func (*APITaskReliability) BuildFromService ¶
func (tr *APITaskReliability) BuildFromService(in reliability.TaskReliability)
BuildFromService converts a service level struct to an API level struct
func (*APITaskReliability) StartAtKey ¶
func (tr *APITaskReliability) StartAtKey() string
StartAtKey returns the start_at key parameter that can be used to paginate and start at this element.
type APITaskRuntimeInfo ¶
type APITaskRuntimeInfo struct { RunningTaskID *string `json:"running_task_id,omitempty"` RunningTaskExecution *int `json:"running_task_execution,omitempty"` }
APITaskRuntimeInfo represents information about tasks that a pod is running or has run previously.
func (*APITaskRuntimeInfo) BuildFromService ¶
func (i *APITaskRuntimeInfo) BuildFromService(info pod.TaskRuntimeInfo)
BuildFromService converts service-layer task runtime information into REST API task runtime information.
func (*APITaskRuntimeInfo) ToService ¶
func (i *APITaskRuntimeInfo) ToService() pod.TaskRuntimeInfo
ToService converts REST API task runtime information into service-layer task runtime information.
type APITaskSpecifier ¶
type APITaskSpecifier struct { // Patch alias to run. PatchAlias *string `json:"patch_alias,omitempty"` // Regex matching tasks to run. TaskRegex *string `json:"task_regex,omitempty"` // Regex matching build variants to run. VariantRegex *string `json:"variant_regex,omitempty"` }
func (*APITaskSpecifier) BuildFromService ¶
func (ts *APITaskSpecifier) BuildFromService(def patch.TaskSpecifier)
func (*APITaskSpecifier) ToService ¶
func (t *APITaskSpecifier) ToService() patch.TaskSpecifier
type APITaskStats ¶
type APITaskStats struct { TaskName *string `json:"task_name"` BuildVariant *string `json:"variant,omitempty"` Distro *string `json:"distro,omitempty"` Date *string `json:"date"` NumSuccess int `json:"num_success"` NumFailed int `json:"num_failed"` NumTotal int `json:"num_total"` NumTimeout int `json:"num_timeout"` NumTestFailed int `json:"num_test_failed"` NumSystemFailed int `json:"num_system_failed"` NumSetupFailed int `json:"num_setup_failed"` AvgDurationSuccess float64 `json:"avg_duration_success"` }
APITaskStats is the model to be returned by the API when querying task execution statistics
func (*APITaskStats) BuildFromService ¶
func (ts *APITaskStats) BuildFromService(v taskstats.TaskStats)
BuildFromService converts a service level struct to an API level struct.
func (*APITaskStats) StartAtKey ¶
func (ts *APITaskStats) StartAtKey() string
StartAtKey returns the start_at key parameter that can be used to paginate and start at this element.
type APITaskSyncOptions ¶
type APITaskSyncOptions struct { // Enable task sync in project configs. ConfigEnabled *bool `json:"config_enabled"` // Enable task sync in patches. PatchEnabled *bool `json:"patch_enabled"` }
func (*APITaskSyncOptions) BuildFromService ¶
func (opts *APITaskSyncOptions) BuildFromService(in model.TaskSyncOptions)
func (*APITaskSyncOptions) ToService ¶
func (opts *APITaskSyncOptions) ToService() model.TaskSyncOptions
type APITest ¶
type APITest struct { ID *string `json:"test_id"` // Identifier of the task this test is a part of TaskID *string `json:"task_id"` Execution int `json:"execution"` // Execution status of the test Status *string `json:"status"` BaseStatus *string `json:"base_status,omitempty"` // Name of the test file that this test was run in TestFile *string `json:"test_file"` GroupID *string `json:"group_id,omitempty"` // Object containing information about the logs for this test Logs TestLogs `json:"logs"` // Time that this test began execution StartTime *time.Time `json:"start_time"` // Time that this test stopped execution EndTime *time.Time `json:"end_time"` Duration float64 `json:"duration"` // The exit code of the process that ran this test ExitCode int `json:"-"` }
APITest contains the data to be returned whenever a test is used in the API.
func (*APITest) BuildFromService ¶
type APIToolchain ¶
type APIToolchain struct { Name *string `json:"name"` Path *string `json:"path"` Version *string `json:"version"` }
APIToolchain is the model to be returned by the API whenever toolchains are fetched.
func (*APIToolchain) BuildFromService ¶
func (apiToolchain *APIToolchain) BuildFromService(toolchain thirdparty.Toolchain)
BuildFromService converts from service level thirdparty.Toolchain to an APIToolchain.
func (*APIToolchain) ToService ¶
func (apiToolchain *APIToolchain) ToService() *thirdparty.Toolchain
ToService returns a service layer toolchain using the data from APIToolchain.
type APITracerSettings ¶
type APITracerSettings struct { Enabled *bool `json:"enabled"` CollectorEndpoint *string `json:"collector_endpoint"` CollectorInternalEndpoint *string `json:"collector_internal_endpoint"` CollectorAPIKey *string `json:"collector_api_key"` }
func (*APITracerSettings) BuildFromService ¶
func (c *APITracerSettings) BuildFromService(h interface{}) error
func (*APITracerSettings) ToService ¶
func (c *APITracerSettings) ToService() (interface{}, error)
type APITriggerConfig ¶
type APITriggerConfig struct {
GenerateTaskDistro *string `json:"generate_distro"`
}
func (*APITriggerConfig) BuildFromService ¶
func (c *APITriggerConfig) BuildFromService(h interface{}) error
func (*APITriggerConfig) ToService ¶
func (c *APITriggerConfig) ToService() (interface{}, error)
type APITriggerDefinition ¶
type APITriggerDefinition struct { // Identifier of project to watch. Project *string `json:"project"` // Trigger on build, task, or push. Level *string `json:"level"` // Identifier for the definition. DefinitionID *string `json:"definition_id"` // Build variant regex to match. BuildVariantRegex *string `json:"variant_regex"` // Task regex to match. TaskRegex *string `json:"task_regex"` // Task status to trigger for (or "*" for all). Status *string `json:"status"` // Number of days after commit when the trigger cannot run. DateCutoff *int `json:"date_cutoff"` // Project configuration file for the trigger. ConfigFile *string `json:"config_file"` // Alias to run for the trigger. Alias *string `json:"alias"` // Deactivate downstream versions created by this trigger. UnscheduleDownstreamVersions *bool `json:"unschedule_downstream_versions"` }
func (*APITriggerDefinition) BuildFromService ¶
func (t *APITriggerDefinition) BuildFromService(triggerDef model.TriggerDefinition)
func (*APITriggerDefinition) ToService ¶
func (t *APITriggerDefinition) ToService() model.TriggerDefinition
type APIUIConfig ¶
type APIUIConfig struct { Url *string `json:"url"` HelpUrl *string `json:"help_url"` UIv2Url *string `json:"uiv2_url"` ParsleyUrl *string `json:"parsley_url"` HttpListenAddr *string `json:"http_listen_addr"` Secret *string `json:"secret"` DefaultProject *string `json:"default_project"` CacheTemplates bool `json:"cache_templates"` CsrfKey *string `json:"csrf_key"` CORSOrigins []string `json:"cors_origins"` FileStreamingContentTypes []string `json:"file_streaming_content_types"` LoginDomain *string `json:"login_domain"` UserVoice *string `json:"userVoice"` BetaFeatures APIBetaFeatures `json:"beta_features"` }
func (*APIUIConfig) BuildFromService ¶
func (a *APIUIConfig) BuildFromService(h interface{}) error
func (*APIUIConfig) ToService ¶
func (a *APIUIConfig) ToService() (interface{}, error)
type APIUiV2URL ¶
type APIUiV2URL struct {
UIv2Url *string `json:"uiv2_url"`
}
APIUiV2URL is a public structure representing the new UI url (e.g. Spruce)
type APIUseSpruceOptions ¶
type APIUseSpruceOptions struct { HasUsedSpruceBefore *bool `json:"has_used_spruce_before" bson:"has_used_spruce_before,omitempty"` HasUsedMainlineCommitsBefore *bool `json:"has_used_mainline_commits_before" bson:"has_used_mainline_commits_before,omitempty"` SpruceV1 *bool `json:"spruce_v1" bson:"spruce_v1,omitempty"` }
type APIUserSettings ¶
type APIUserSettings struct { Timezone *string `json:"timezone"` Region *string `json:"region"` UseSpruceOptions *APIUseSpruceOptions `json:"use_spruce_options"` GithubUser *APIGithubUser `json:"github_user"` SlackUsername *string `json:"slack_username"` SlackMemberId *string `json:"slack_member_id"` Notifications *APINotificationPreferences `json:"notifications"` SpruceFeedback *APIFeedbackSubmission `json:"spruce_feedback"` DateFormat *string `json:"date_format"` TimeFormat *string `json:"time_format"` }
func (*APIUserSettings) BuildFromService ¶
func (s *APIUserSettings) BuildFromService(settings user.UserSettings)
func (*APIUserSettings) ToService ¶
func (s *APIUserSettings) ToService() (user.UserSettings, error)
type APIVariantTasks ¶
type APIVariantTasks struct { Variant *string Tasks []string DisplayTasks []APIDisplayTask }
func APIVariantTasksBuildFromService ¶
func APIVariantTasksBuildFromService(v patch.VariantTasks) APIVariantTasks
type APIVersion ¶
type APIVersion struct { Id *string `json:"version_id"` // Time that the version was first created CreateTime *time.Time `json:"create_time"` // Time at which tasks associated with this version started running StartTime *time.Time `json:"start_time"` // Time at which tasks associated with this version finished running FinishTime *time.Time `json:"finish_time"` // The version control identifier Revision *string `json:"revision"` Order int `json:"order"` Project *string `json:"project"` ProjectIdentifier *string `json:"project_identifier"` // Author of the version Author *string `json:"author"` // Email of the author of the version AuthorEmail *string `json:"author_email"` // Message left with the commit Message *string `json:"message"` // The status of the version (possible values are "created", "started", "success", or "failed") Status *string `json:"status"` // The github repository where the commit was made Repo *string `json:"repo"` // The version control branch where the commit was made Branch *string `json:"branch"` Parameters []APIParameter `json:"parameters"` // List of documents of the associated build variant and the build id BuildVariantStatus []buildDetail `json:"build_variants_status"` Builds []APIBuild `json:"builds,omitempty"` // Version created by one of "patch_request", "github_pull_request", // "gitter_request" (caused by git commit, aka the repotracker requester), // "trigger_request" (Project Trigger versions) , "merge_test" (commit queue // patches), "ad_hoc" (periodic builds) Requester *string `json:"requester"` Errors []*string `json:"errors"` // Will be null for versions created before this field was added. Activated *bool `json:"activated"` Aborted *bool `json:"aborted"` // The git tag that triggered this version, if any. TriggeredGitTag *APIGitTag `json:"triggered_by_git_tag"` // Git tags that were pushed to this version. GitTags []APIGitTag `json:"git_tags"` // Indicates if the version was ignored due to only making changes to ignored files. Ignored *bool `json:"ignored"` }
APIVersion is the model to be returned by the API whenever versions are fetched.
func (*APIVersion) BuildFromService ¶
func (apiVersion *APIVersion) BuildFromService(v model.Version)
BuildFromService converts from service level structs to an APIVersion.
func (*APIVersion) IsPatchRequester ¶
func (apiVersion *APIVersion) IsPatchRequester() bool
type APIVersions ¶
type APIVersions struct { // whether or not the version element actually consists of multiple inactive // versions rolled up into one RolledUp bool `json:"rolled_up"` Versions []APIVersion `json:"versions"` }
type APIVolume ¶
type APIVolume struct { ID *string `json:"volume_id"` DisplayName *string `json:"display_name"` CreatedBy *string `json:"created_by"` Type *string `json:"type"` AvailabilityZone *string `json:"zone"` Size int `json:"size"` Expiration *time.Time `json:"expiration"` DeviceName *string `json:"device_name"` HostID *string `json:"host_id"` NoExpiration bool `json:"no_expiration"` HomeVolume bool `json:"home_volume"` CreationTime *time.Time `json:"creation_time"` Migrating bool `json:"migrating"` }
func (*APIVolume) BuildFromService ¶
type APIVolumeModify ¶
type APIWebHook ¶
type APIWebhookHeader ¶
type APIWebhookHeader struct { Key *string `json:"key" mapstructure:"key"` Value *string `json:"value" mapstructure:"value"` }
func (*APIWebhookHeader) BuildFromService ¶
func (s *APIWebhookHeader) BuildFromService(h event.WebhookHeader)
func (*APIWebhookHeader) ToService ¶
func (s *APIWebhookHeader) ToService() event.WebhookHeader
type APIWebhookSubscriber ¶
type APIWebhookSubscriber struct { URL *string `json:"url" mapstructure:"url"` Secret *string `json:"secret" mapstructure:"secret"` Retries int `json:"retries" mapstructure:"retries"` MinDelayMS int `json:"min_delay_ms" mapstructure:"min_delay_ms"` TimeoutMS int `json:"timeout_ms" mapstructure:"timeout_ms"` Headers []APIWebhookHeader `json:"headers" mapstructure:"headers"` }
func (*APIWebhookSubscriber) BuildFromService ¶
func (s *APIWebhookSubscriber) BuildFromService(h interface{}) error
func (*APIWebhookSubscriber) ToService ¶
func (s *APIWebhookSubscriber) ToService() event.WebhookSubscriber
type APIWorkstationConfig ¶
type APIWorkstationConfig struct { // List of setup commands to run. SetupCommands []APIWorkstationSetupCommand `bson:"setup_commands" json:"setup_commands"` // Git clone the project in the workstation. GitClone *bool `bson:"git_clone" json:"git_clone"` }
func (*APIWorkstationConfig) BuildFromService ¶
func (c *APIWorkstationConfig) BuildFromService(config model.WorkstationConfig)
func (*APIWorkstationConfig) ToService ¶
func (c *APIWorkstationConfig) ToService() model.WorkstationConfig
type APIapiConfig ¶
type APIapiConfig struct { HttpListenAddr *string `json:"http_listen_addr"` GithubWebhookSecret *string `json:"github_webhook_secret"` URL *string `json:"url"` }
func (*APIapiConfig) BuildFromService ¶
func (a *APIapiConfig) BuildFromService(h interface{}) error
func (*APIapiConfig) ToService ¶
func (a *APIapiConfig) ToService() (interface{}, error)
type AliasedType ¶
type AliasedType string
type ApiTaskEndDetail ¶
type ApiTaskEndDetail struct { // The status of the completed task. Status *string `json:"status"` // The method by which the task failed. Type *string `json:"type"` // Description of the final status of this task. Description *string `json:"desc"` // Command which indiciates the task failure. FailingCommand *string `json:"failing_command"` // PostErrored is true when the post command errored. PostErrored bool `json:"post_errored"` // FailureMetadataTags contains the metadata tags associated with the // command that caused the task to fail. These are not set if the task // succeeded. FailureMetadataTags []string `json:"failure_metadata_tags"` // OtherFailingCommands contain information about commands that failed but // did not cause the task to fail. OtherFailingCommands []APIFailingCommand `json:"other_failing_commands,omitempty"` // Whether this task ended in a timeout. TimedOut bool `json:"timed_out"` TimeoutType *string `json:"timeout_type"` OOMTracker APIOomTrackerInfo `json:"oom_tracker_info"` TraceID *string `json:"trace_id"` DiskDevices []string `json:"disk_devices"` }
func (*ApiTaskEndDetail) BuildFromService ¶
func (at *ApiTaskEndDetail) BuildFromService(t apimodels.TaskEndDetail) error
func (*ApiTaskEndDetail) ToService ¶
func (ad *ApiTaskEndDetail) ToService() apimodels.TaskEndDetail
type ChildPatch ¶
type CompareTasksRequest ¶
type CompareTasksResponse ¶
type DefinitionInfo ¶
type DistroInfo ¶
type DistroInfo struct { // Unique Identifier of this distro. Can be used to fetch more informaiton about this distro Id *string `json:"distro_id"` // The service which provides this type of machine Provider *string `json:"provider"` ImageId *string `json:"image_id"` WorkDir *string `json:"work_dir"` IsVirtualWorkstation bool `json:"is_virtual_workstation"` User *string `json:"user"` IsWindows bool `json:"is_windows"` BootstrapMethod *string `json:"bootstrap_method"` }
type DownstreamTasks ¶
type DownstreamTasks struct { Project *string `json:"project"` Tasks []*string `json:"tasks"` VariantTasks []VariantTask `json:"variant_tasks"` }
type GithubCommentCqData ¶
func ParseGitHubComment ¶
func ParseGitHubComment(comment string) GithubCommentCqData
type HostAPIEventData ¶
type HostAPIEventData struct { AgentRevision *string `bson:"a_rev,omitempty" json:"agent_revision,omitempty"` AgentBuild *string `bson:"a_build,omitempty" json:"agent_build,omitempty"` JasperRevision *string `bson:"j_rev,omitempty" json:"jasper_revision,omitempty"` OldStatus *string `bson:"o_s,omitempty" json:"old_status,omitempty"` NewStatus *string `bson:"n_s,omitempty" json:"new_status,omitempty"` Logs *string `bson:"log,omitempty" json:"logs,omitempty"` Hostname *string `bson:"hn,omitempty" json:"hostname,omitempty"` ProvisioningMethod *string `bson:"prov_method" json:"provisioning_method,omitempty"` TaskId *string `bson:"t_id,omitempty" json:"task_id,omitempty"` TaskPid *string `bson:"t_pid,omitempty" json:"task_pid,omitempty"` TaskStatus *string `bson:"t_st,omitempty" json:"task_status,omitempty"` Execution *string `bson:"execution,omitempty" json:"execution,omitempty"` MonitorOp *string `bson:"monitor_op,omitempty" json:"monitor,omitempty"` User *string `bson:"usr" json:"user,omitempty"` Successful bool `bson:"successful,omitempty" json:"successful"` Duration APIDuration `bson:"duration,omitempty" json:"duration"` }
func (*HostAPIEventData) BuildFromService ¶
func (el *HostAPIEventData) BuildFromService(v *event.HostEventData)
type HostAPIEventLogEntry ¶
type HostAPIEventLogEntry struct { ID *string `bson:"_id" json:"-"` ResourceType *string `bson:"r_type,omitempty" json:"resource_type,omitempty"` ProcessedAt *time.Time `bson:"processed_at" json:"processed_at"` Timestamp *time.Time `bson:"ts" json:"timestamp"` ResourceId *string `bson:"r_id" json:"resource_id"` EventType *string `bson:"e_type" json:"event_type"` Data *HostAPIEventData `bson:"data" json:"data"` }
func (*HostAPIEventLogEntry) BuildFromService ¶
func (el *HostAPIEventLogEntry) BuildFromService(entry event.EventLogEntry) error
type HostListResults ¶
type HostListResults struct { Hosts []APICreateHost Details []APIHostCreateDetail }
type HostRequestOptions ¶
type HostRequestOptions struct { DistroID string `json:"distro" yaml:"distro"` TaskID string `json:"task" yaml:"task"` TaskSync bool `json:"task_sync" yaml:"task_sync"` Region string `json:"region" yaml:"region"` KeyName string `json:"keyname" yaml:"key"` UserData string `json:"userdata" yaml:"userdata_file"` SetupScript string `json:"setup_script" yaml:"setup_file"` UseProjectSetupScript bool `json:"use_setup_script_path" yaml:"use_setup_script_path"` Tag string `yaml:"tag"` InstanceTags []host.Tag `json:"instance_tags" yaml:"instance_tags"` InstanceType string `json:"instance_type" yaml:"type"` NoExpiration bool `json:"no_expiration" yaml:"no-expire"` host.SleepScheduleOptions IsVirtualWorkstation bool `json:"is_virtual_workstation" yaml:"is_virtual_workstation"` IsCluster bool `json:"is_cluster" yaml:"is_cluster"` HomeVolumeSize int `json:"home_volume_size" yaml:"home_volume_size"` HomeVolumeID string `json:"home_volume_id" yaml:"home_volume_id"` Expiration *time.Time `json:"expiration" yaml:"expiration"` }
HostRequestOptions is a struct that holds the format of a POST request to /hosts the yaml tags are used by hostCreate() when parsing the params from a file.
type LogLinks ¶
type LogLinks struct { // Link to logs containing merged copy of all other logs AllLogLink *string `json:"all_log"` // Link to logs created by the task execution TaskLogLink *string `json:"task_log"` // Link to logs created by the agent process AgentLogLink *string `json:"agent_log"` // Link to logs created by the machine running the task SystemLogLink *string `json:"system_log"` EventLogLink *string `json:"event_log,omitempty"` }
type MockEmbedded ¶
type MockEmbedded struct {
One MockLayerOne
}
type MockLayerOne ¶
type MockLayerOne struct {
Two MockLayerTwo
}
type MockLayerTwo ¶
type MockLayerTwo struct {
SomeField *string
}
type MockModel ¶
type MockModel struct { FieldId string FieldInt1 int FieldInt2 int FieldMap map[string]string FieldStruct *MockSubStruct }
func (*MockModel) BuildFromService ¶
type MockScalars ¶
type MockSubStruct ¶
type MockSubStruct struct {
SubInt int
}
type Model ¶
Model defines how an API resource which will be both taken from requests and turned into service layer models and taken from service layer models and turned into API models to be returned. Unless there's a specific need to implement it, in general it is neither necessary nor recommended to implement this model due to its reliance on interface{}; instead, pass in and return the actual service model that corresponds to the REST model.
func AdminDbToRestModel ¶
func AdminDbToRestModel(in evergreen.ConfigSection) (Model, error)
type PodAPIEventData ¶
type PodAPIEventData struct { OldStatus *string `bson:"old_status,omitempty" json:"old_status,omitempty"` NewStatus *string `bson:"new_status,omitempty" json:"new_status,omitempty"` Reason *string `bson:"reason,omitempty" json:"reason,omitempty"` // Fields related to pods running tasks TaskID *string `bson:"task_id,omitempty" json:"task_id,omitempty"` TaskExecution *int `bson:"task_execution,omitempty" json:"task_execution,omitempty"` TaskStatus *string `bson:"task_status,omitempty" json:"task_status,omitempty"` }
func (*PodAPIEventData) BuildFromService ¶
func (el *PodAPIEventData) BuildFromService(v *event.PodData)
type PodAPIEventLogEntry ¶
type PodAPIEventLogEntry struct { ID *string `bson:"_id" json:"-"` ResourceType *string `bson:"r_type,omitempty" json:"resource_type,omitempty"` ProcessedAt *time.Time `bson:"processed_at" json:"processed_at"` Timestamp *time.Time `bson:"ts" json:"timestamp"` ResourceId *string `bson:"r_id" json:"resource_id"` EventType *string `bson:"e_type" json:"event_type"` Data *PodAPIEventData `bson:"data" json:"data"` }
func (*PodAPIEventLogEntry) BuildFromService ¶
func (el *PodAPIEventLogEntry) BuildFromService(entry event.EventLogEntry) error
type ProjectTaskExecutionResp ¶
type ProjectTaskExecutionResp struct {
NumCompleted int `json:"num_completed"`
}
type RestartResponse ¶
type RestartResponse struct { ItemsRestarted []string `json:"items_restarted"` ItemsErrored []string `json:"items_errored"` }
RestartTasksResponse is the response model returned from the /admin/restart route
func (*RestartResponse) BuildFromService ¶
func (rtr *RestartResponse) BuildFromService(h interface{}) error
BuildFromService builds a model from the service layer
func (*RestartResponse) ToService ¶
func (rtr *RestartResponse) ToService() (interface{}, error)
ToService is not implemented for /admin/restart
type StartAtKey ¶
type StartAtKey struct {
// contains filtered or unexported fields
}
StartAtKey is a struct used to build the start_at key parameter for pagination.
func (StartAtKey) String ¶
func (s StartAtKey) String() string
type StructWithAliased ¶
type StructWithAliased struct { Foo AliasedType Bar string }
type TaskAPIEventLogEntry ¶
type TaskAPIEventLogEntry struct { ID *string `bson:"_id" json:"-"` ResourceType *string `bson:"r_type,omitempty" json:"resource_type,omitempty"` ProcessedAt *time.Time `bson:"processed_at" json:"processed_at"` Timestamp *time.Time `bson:"ts" json:"timestamp"` ResourceId *string `bson:"r_id" json:"resource_id"` EventType *string `bson:"e_type" json:"event_type"` Data *TaskEventData `bson:"data" json:"data"` }
func (*TaskAPIEventLogEntry) BuildFromService ¶
func (el *TaskAPIEventLogEntry) BuildFromService(ctx context.Context, v event.EventLogEntry) error
type TaskEventData ¶
type TaskEventData struct { Execution int `bson:"execution" json:"execution"` HostId *string `bson:"h_id,omitempty" json:"host_id,omitempty"` PodId *string `bson:"pod_id,omitempty" json:"pod_id,omitempty"` UserId *string `bson:"u_id,omitempty" json:"user_id,omitempty"` Status *string `bson:"s,omitempty" json:"status,omitempty"` JiraIssue *string `bson:"jira,omitempty" json:"jira,omitempty"` JiraLink *string `bson:"jira_link,omitempty" json:"jira_link,omitempty"` BlockedOn *string `bson:"blocked_on,omitempty" json:"blocked_on,omitempty"` Timestamp *time.Time `bson:"ts,omitempty" json:"timestamp,omitempty"` Priority int64 `bson:"pri,omitempty" json:"priority,omitempty"` }
func (*TaskEventData) BuildFromService ¶
func (el *TaskEventData) BuildFromService(ctx context.Context, v *event.TaskEventData) error
type TaskInfo ¶
type TaskInfo struct { // Unique Identifier of this task. Can be used to fetch more informaiton about this task Id *string `json:"task_id"` // The name of this task Name *string `json:"name"` // Time that this task was dispatched to this host DispatchTime *time.Time `json:"dispatch_time"` // Unique identifier for the version of the project that this task is run as part of VersionId *string `json:"version_id"` // Unique identifier for the build of the project that this task is run as part of BuildId *string `json:"build_id"` StartTime *time.Time `json:"start_time"` }
type TestLogs ¶
type TestLogs struct { // URL where the log can be fetched URL *string `json:"url"` // URL of the unprocessed version of the logs file for this test URLRaw *string `json:"url_raw"` URLParsley *string `json:"url_parsley,omitempty"` // Line number in the log file corresponding to information about this test LineNum int `json:"line_num"` RenderingType *string `json:"rendering_type"` Version int32 `json:"version"` }
TestLogs is a struct for storing the information about logs that will be written out as part of an APITest.
type UIProjectFields ¶
type UIProjectFields struct { Id string `json:"id"` Identifier string `json:"identifier"` DisplayName string `json:"display_name"` Repo string `json:"repo_name"` Owner string `json:"owner_name"` }
publicProjectFields are the fields needed by the UI on base_angular and the menu
type VariantTask ¶
type VersionVariantData ¶
type VersionVariantData struct { Rows map[string]BuildList `json:"rows"` Versions []APIVersions `json:"versions"` BuildVariants []string `json:"build_variants"` }
type VolumeModifyOptions ¶
type VolumePostRequest ¶
Source Files ¶
- admin.go
- admin_event.go
- artifact.go
- beta_features.go
- build.go
- cli_update.go
- commit_queue.go
- createhost.go
- distro.go
- doc.go
- event.go
- generated.go
- generated_converters.go
- host.go
- image.go
- listhost.go
- mocks.go
- model.go
- notification.go
- notifications.go
- parsley.go
- patch.go
- permissions.go
- pod.go
- project.go
- project_event.go
- reliability.go
- scheduler.go
- status.go
- subscriber.go
- subscriptions.go
- task.go
- task_annotations.go
- task_queue.go
- task_stats.go
- test.go
- time.go
- user.go
- version.go
- versions.go