Documentation
¶
Overview ¶
Package opslevel provides an OpsLevel API client implementation.
see README for more details.
Index ¶
- Variables
- func AllRunnerJobOutcomeEnum() []string
- func AllRunnerJobStatusEnum() []string
- func AllRunnerStatusTypeEnum() []string
- func Bool(v bool) *bool
- func EmptyString() *string
- func FormatErrors(errs []OpsLevelErrors) error
- func HandleErrors(err error, errs []OpsLevelErrors) error
- func IsID(value string) bool
- func NewISO8601Date(datetime string) iso8601.Time
- func NewISO8601DateNow() iso8601.Time
- func NewInt(i int) *int
- func NewRestClient(options ...Option) *resty.Client
- func NewString(value string) *graphql.String
- func NullString() *string
- func WithName(name string) graphql.Option
- type AlertSource
- type AlertSourceDeleteInput
- type AlertSourceExternalIdentifier
- type AlertSourceService
- type AlertSourceServiceCreateInput
- type AlertSourceStatusTypeEnum
- type AlertSourceTypeEnum
- type AlertSourceUsageCheckFragment
- type AliasCreateInput
- type AliasDeleteInput
- type AliasOwnerTypeEnum
- type ApiDocumentSourceEnum
- type BasicTypeEnum
- type Cacher
- func (c *Cacher) CacheAll(client *Client)
- func (c *Cacher) CacheCategories(client *Client)
- func (c *Cacher) CacheFilters(client *Client)
- func (c *Cacher) CacheIntegrations(client *Client)
- func (c *Cacher) CacheLevels(client *Client)
- func (c *Cacher) CacheLifecycles(client *Client)
- func (c *Cacher) CacheRepositories(client *Client)
- func (c *Cacher) CacheTeams(client *Client)
- func (c *Cacher) CacheTiers(client *Client)
- func (c *Cacher) TryGetCategory(alias string) (*Category, bool)
- func (c *Cacher) TryGetFilter(alias string) (*Filter, bool)
- func (c *Cacher) TryGetIntegration(alias string) (*Integration, bool)
- func (c *Cacher) TryGetLevel(alias string) (*Level, bool)
- func (c *Cacher) TryGetLifecycle(alias string) (*Lifecycle, bool)
- func (c *Cacher) TryGetRepository(alias string) (*Repository, bool)
- func (c *Cacher) TryGetTeam(alias string) (*Team, bool)
- func (c *Cacher) TryGetTier(alias string) (*Tier, bool)
- type CampaignFilterEnum
- type CampaignReminderTypeEnum
- type CampaignServiceStatusEnum
- type CampaignSortEnum
- type CampaignStatusEnum
- type Category
- type CategoryBreakdown
- type CategoryConnection
- type CategoryCreateInput
- type CategoryDeleteInput
- type CategoryUpdateInput
- type Check
- type CheckAlertSourceUsageCreateInput
- type CheckAlertSourceUsageUpdateInput
- type CheckConnection
- type CheckCreateInput
- type CheckCreateInputProvider
- type CheckCustomEventCreateInput
- type CheckCustomEventUpdateInput
- type CheckDeleteInput
- type CheckGitBranchProtectionCreateInput
- type CheckGitBranchProtectionUpdateInput
- type CheckHasDocumentationCreateInput
- type CheckHasDocumentationUpdateInput
- type CheckHasRecentDeployCreateInput
- type CheckHasRecentDeployUpdateInput
- type CheckManualCreateInput
- type CheckManualUpdateInput
- type CheckOwner
- type CheckRepositoryFileCreateInput
- type CheckRepositoryFileUpdateInput
- type CheckRepositoryGrepCreateInput
- type CheckRepositoryGrepUpdateInput
- type CheckRepositoryIntegratedCreateInput
- type CheckRepositoryIntegratedUpdateInput
- type CheckRepositorySearchCreateInput
- type CheckRepositorySearchUpdateInput
- type CheckResponsePayload
- type CheckServiceConfigurationCreateInput
- type CheckServiceConfigurationUpdateInput
- type CheckServiceDependencyCreateInput
- type CheckServiceDependencyUpdateInput
- type CheckServiceOwnershipCreateInput
- type CheckServiceOwnershipUpdateInput
- type CheckServicePropertyCreateInput
- type CheckServicePropertyUpdateInput
- type CheckStatus
- type CheckTagDefinedCreateInput
- type CheckTagDefinedUpdateInput
- type CheckToolUsageCreateInput
- type CheckToolUsageUpdateInput
- type CheckType
- type CheckUpdateInput
- type CheckUpdateInputProvider
- type Client
- func (client *Client) AddContact(team string, contact ContactInput) (*Contact, error)
- func (client *Client) AddMember(team *TeamId, email string) ([]User, error)
- func (client *Client) AddMembers(team *TeamId, emails []string) ([]User, error)
- func (client *Client) AssignTag(input TagAssignInput) ([]Tag, error)
- func (client *Client) AssignTagForAlias(alias string, key string, value string) ([]Tag, error)deprecated
- func (client *Client) AssignTagForId(id ID, key string, value string) ([]Tag, error)deprecated
- func (client *Client) AssignTags(identifier string, tags map[string]string) ([]Tag, error)
- func (client *Client) AssignTagsForAlias(alias string, tags map[string]string) ([]Tag, error)deprecated
- func (client *Client) AssignTagsForId(id ID, tags map[string]string) ([]Tag, error)deprecated
- func (client *Client) ConnectServiceRepository(service *ServiceId, repository *Repository) (*ServiceRepository, error)
- func (client *Client) CreateAlertSourceService(input AlertSourceServiceCreateInput) (*AlertSourceService, error)
- func (client *Client) CreateAlias(input AliasCreateInput) ([]string, error)
- func (client *Client) CreateAliases(ownerId ID, aliases []string) ([]string, error)
- func (client *Client) CreateCategory(input CategoryCreateInput) (*Category, error)
- func (client *Client) CreateCheckAlertSourceUsage(input CheckAlertSourceUsageCreateInput) (*Check, error)
- func (client *Client) CreateCheckCustomEvent(input CheckCustomEventCreateInput) (*Check, error)
- func (client *Client) CreateCheckGitBranchProtection(input CheckGitBranchProtectionCreateInput) (*Check, error)
- func (client *Client) CreateCheckHasDocumentation(input CheckHasDocumentationCreateInput) (*Check, error)
- func (client *Client) CreateCheckHasRecentDeploy(input CheckHasRecentDeployCreateInput) (*Check, error)
- func (client *Client) CreateCheckManual(input CheckManualCreateInput) (*Check, error)
- func (client *Client) CreateCheckRepositoryFile(input CheckRepositoryFileCreateInput) (*Check, error)
- func (client *Client) CreateCheckRepositoryGrep(input CheckRepositoryGrepCreateInput) (*Check, error)
- func (client *Client) CreateCheckRepositoryIntegrated(input CheckRepositoryIntegratedCreateInput) (*Check, error)
- func (client *Client) CreateCheckRepositorySearch(input CheckRepositorySearchCreateInput) (*Check, error)
- func (client *Client) CreateCheckServiceConfiguration(input CheckServiceConfigurationCreateInput) (*Check, error)
- func (client *Client) CreateCheckServiceDependency(input CheckServiceDependencyCreateInput) (*Check, error)
- func (client *Client) CreateCheckServiceOwnership(input CheckServiceOwnershipCreateInput) (*Check, error)
- func (client *Client) CreateCheckServiceProperty(input CheckServicePropertyCreateInput) (*Check, error)
- func (client *Client) CreateCheckTagDefined(input CheckTagDefinedCreateInput) (*Check, error)
- func (client *Client) CreateCheckToolUsage(input CheckToolUsageCreateInput) (*Check, error)
- func (c *Client) CreateDomain(input DomainInput) (*Domain, error)
- func (client *Client) CreateFilter(input FilterCreateInput) (*Filter, error)
- func (client *Client) CreateGroup(input GroupInput) (*Group, error)
- func (client *Client) CreateLevel(input LevelCreateInput) (*Level, error)
- func (client *Client) CreateService(input ServiceCreateInput) (*Service, error)
- func (client *Client) CreateServiceRepository(input ServiceRepositoryCreateInput) (*ServiceRepository, error)
- func (c *Client) CreateSystem(input SystemInput) (*System, error)
- func (client *Client) CreateTag(input TagCreateInput) (*Tag, error)
- func (client *Client) CreateTags(identifier string, tags map[string]string) ([]Tag, error)
- func (client *Client) CreateTagsForId(id ID, tags map[string]string) ([]Tag, error)deprecated
- func (client *Client) CreateTeam(input TeamCreateInput) (*Team, error)
- func (client *Client) CreateTool(input ToolCreateInput) (*Tool, error)
- func (client *Client) CreateTriggerDefinition(input CustomActionsTriggerDefinitionCreateInput) (*CustomActionsTriggerDefinition, error)
- func (client *Client) CreateWebhookAction(input CustomActionsWebhookActionCreateInput) (*CustomActionsExternalAction, error)
- func (client *Client) DeleteAlertSourceService(id ID) error
- func (client *Client) DeleteAlias(input AliasDeleteInput) error
- func (client *Client) DeleteCategory(id ID) error
- func (client *Client) DeleteCheck(id ID) error
- func (c *Client) DeleteDomain(identifier string) error
- func (client *Client) DeleteFilter(id ID) error
- func (client *Client) DeleteGroup(identifier string) error
- func (client *Client) DeleteGroupWithAlias(alias string) errordeprecated
- func (client *Client) DeleteLevel(id ID) error
- func (client *Client) DeleteService(input ServiceDeleteInput) error
- func (client *Client) DeleteServiceAlias(alias string) error
- func (client *Client) DeleteServiceRepository(id ID) error
- func (client *Client) DeleteServiceWithAlias(alias string) error
- func (c *Client) DeleteSystem(identifier string) error
- func (client *Client) DeleteTag(id ID) error
- func (client *Client) DeleteTeam(id ID) error
- func (client *Client) DeleteTeamAlias(alias string) error
- func (client *Client) DeleteTeamWithAlias(alias string) error
- func (client *Client) DeleteTeamWithId(id ID) errordeprecated
- func (client *Client) DeleteTool(id ID) error
- func (client *Client) DeleteTriggerDefinition(input IdentifierInput) error
- func (client *Client) DeleteUser(user string) error
- func (client *Client) DeleteWebhookAction(input IdentifierInput) error
- func (client *Client) ExecRaw(q string, variables map[string]interface{}, options ...graphql.Option) ([]byte, error)
- func (client *Client) ExecRawCTX(ctx context.Context, q string, variables map[string]interface{}, ...) ([]byte, error)
- func (client *Client) GetAlertSource(id ID) (*AlertSource, error)
- func (client *Client) GetAlertSourceWithExternalIdentifier(input AlertSourceExternalIdentifier) (*AlertSource, error)
- func (client *Client) GetCategory(id ID) (*Category, error)
- func (client *Client) GetCheck(id ID) (*Check, error)
- func (client *Client) GetCustomAction(input IdentifierInput) (*CustomActionsExternalAction, error)
- func (c *Client) GetDomain(identifier string) (*Domain, error)
- func (client *Client) GetFilter(id ID) (*Filter, error)
- func (client *Client) GetGroup(id ID) (*Group, error)
- func (client *Client) GetGroupWithAlias(alias string) (*Group, error)
- func (client *Client) GetIntegration(id ID) (*Integration, error)
- func (client *Client) GetLevel(id ID) (*Level, error)
- func (client *Client) GetRepository(id ID) (*Repository, error)
- func (client *Client) GetRepositoryWithAlias(alias string) (*Repository, error)
- func (client *Client) GetService(id ID) (*Service, error)
- func (client *Client) GetServiceCount() (int, error)
- func (client *Client) GetServiceIdWithAlias(alias string) (*ServiceId, error)
- func (c *Client) GetServiceMaturityWithAlias(alias string) (*ServiceMaturity, error)
- func (client *Client) GetServiceWithAlias(alias string) (*Service, error)
- func (client *Client) GetServiceWithId(id ID) (*Service, error)deprecated
- func (c *Client) GetSystem(identifier string) (*System, error)
- func (client *Client) GetTagCount(id ID) (int, error)deprecated
- func (client *Client) GetTagsForService(id ID) ([]Tag, error)deprecated
- func (client *Client) GetTagsForServiceWithAlias(alias string) ([]Tag, error)deprecated
- func (client *Client) GetTagsForServiceWithId(id ID) ([]Tag, error)deprecated
- func (client *Client) GetTeam(id ID) (*Team, error)
- func (client *Client) GetTeamCount() (int, error)
- func (client *Client) GetTeamWithAlias(alias string) (*Team, error)
- func (client *Client) GetTeamWithId(id ID) (*Team, error)deprecated
- func (client *Client) GetToolCount(id ID) (int, error)deprecated
- func (client *Client) GetToolsForService(id ID, variables *PayloadVariables) ([]Tool, error)deprecated
- func (client *Client) GetToolsForServiceWithAlias(alias string) ([]Tool, error)deprecated
- func (client *Client) GetToolsForServiceWithId(id ID) ([]Tool, error)deprecated
- func (client *Client) GetTriggerDefinition(input IdentifierInput) (*CustomActionsTriggerDefinition, error)
- func (client *Client) GetUser(value string) (*User, error)
- func (client *Client) InitialPageVariables() PayloadVariables
- func (client *Client) InitialPageVariablesPointer() *PayloadVariables
- func (client *Client) InviteUser(email string, input UserInput) (*User, error)
- func (client *Client) ListCategories(variables *PayloadVariables) (*CategoryConnection, error)
- func (client *Client) ListChecks(variables *PayloadVariables) (CheckConnection, error)
- func (client *Client) ListCustomActions(variables *PayloadVariables) (CustomActionsExternalActionsConnection, error)
- func (c *Client) ListDomains(variables *PayloadVariables) (*DomainConnection, error)
- func (client *Client) ListFilters(variables *PayloadVariables) (FilterConnection, error)
- func (client *Client) ListGroups(variables *PayloadVariables) (GroupConnection, error)
- func (client *Client) ListIntegrations(variables *PayloadVariables) (IntegrationConnection, error)
- func (client *Client) ListLevels() ([]Level, error)
- func (client *Client) ListLifecycles() ([]Lifecycle, error)
- func (client *Client) ListRepositories(variables *PayloadVariables) (*RepositoryConnection, error)
- func (client *Client) ListRepositoriesWithTier(tier string, variables *PayloadVariables) (*RepositoryConnection, error)
- func (client *Client) ListServices(variables *PayloadVariables) (ServiceConnection, error)
- func (c *Client) ListServicesMaturity() ([]ServiceMaturity, error)
- func (client *Client) ListServicesWithFramework(framework string, variables *PayloadVariables) (ServiceConnection, error)
- func (client *Client) ListServicesWithLanguage(language string, variables *PayloadVariables) (ServiceConnection, error)
- func (client *Client) ListServicesWithLifecycle(lifecycle string, variables *PayloadVariables) (ServiceConnection, error)
- func (client *Client) ListServicesWithOwner(owner string, variables *PayloadVariables) (ServiceConnection, error)
- func (client *Client) ListServicesWithProduct(product string, variables *PayloadVariables) (ServiceConnection, error)
- func (client *Client) ListServicesWithTag(tag TagArgs, variables *PayloadVariables) (ServiceConnection, error)
- func (client *Client) ListServicesWithTier(tier string, variables *PayloadVariables) (ServiceConnection, error)
- func (c *Client) ListSystems(variables *PayloadVariables) (*SystemConnection, error)
- func (client *Client) ListTeams(variables *PayloadVariables) (*TeamConnection, error)
- func (client *Client) ListTeamsWithManager(email string, variables *PayloadVariables) (*TeamConnection, error)
- func (client *Client) ListTiers() ([]Tier, error)
- func (client *Client) ListTriggerDefinitions(variables *PayloadVariables) (CustomActionsTriggerDefinitionsConnection, error)
- func (client *Client) ListUsers(variables *PayloadVariables) (UserConnection, error)
- func (client *Client) Mutate(m interface{}, variables map[string]interface{}, options ...graphql.Option) error
- func (client *Client) MutateCTX(ctx context.Context, m interface{}, variables map[string]interface{}, ...) error
- func (client *Client) Query(q interface{}, variables map[string]interface{}, options ...graphql.Option) error
- func (client *Client) QueryCTX(ctx context.Context, q interface{}, variables map[string]interface{}, ...) error
- func (client *Client) RemoveContact(contact ID) error
- func (client *Client) RemoveMember(team *TeamId, email string) ([]User, error)
- func (client *Client) RemoveMembers(team *TeamId, emails []string) ([]User, error)
- func (c *Client) RunnerAppendJobLog(input RunnerAppendJobLogInput) error
- func (c *Client) RunnerGetPendingJob(runnerId ID, lastUpdateToken ID) (*RunnerJob, ID, error)
- func (c *Client) RunnerRegister() (*Runner, error)
- func (c *Client) RunnerReportJobOutcome(input RunnerReportJobOutcomeInput) error
- func (c *Client) RunnerScale(runnerId ID, currentReplicaCount, jobConcurrency int) (*RunnerScale, error)
- func (c *Client) RunnerUnregister(runnerId ID) error
- func (c *Client) ServiceApiDocSettingsUpdate(service string, docPath string, docSource *ApiDocumentSourceEnum) (*Service, error)
- func (client *Client) UpdateCategory(input CategoryUpdateInput) (*Category, error)
- func (client *Client) UpdateCheckAlertSourceUsage(input CheckAlertSourceUsageUpdateInput) (*Check, error)
- func (client *Client) UpdateCheckCustomEvent(input CheckCustomEventUpdateInput) (*Check, error)
- func (client *Client) UpdateCheckGitBranchProtection(input CheckGitBranchProtectionUpdateInput) (*Check, error)
- func (client *Client) UpdateCheckHasDocumentation(input CheckHasDocumentationUpdateInput) (*Check, error)
- func (client *Client) UpdateCheckHasRecentDeploy(input CheckHasRecentDeployUpdateInput) (*Check, error)
- func (client *Client) UpdateCheckManual(input CheckManualUpdateInput) (*Check, error)
- func (client *Client) UpdateCheckRepositoryFile(input CheckRepositoryFileUpdateInput) (*Check, error)
- func (client *Client) UpdateCheckRepositoryGrep(input CheckRepositoryGrepUpdateInput) (*Check, error)
- func (client *Client) UpdateCheckRepositoryIntegrated(input CheckRepositoryIntegratedUpdateInput) (*Check, error)
- func (client *Client) UpdateCheckRepositorySearch(input CheckRepositorySearchUpdateInput) (*Check, error)
- func (client *Client) UpdateCheckServiceConfiguration(input CheckServiceConfigurationUpdateInput) (*Check, error)
- func (client *Client) UpdateCheckServiceDependency(input CheckServiceDependencyUpdateInput) (*Check, error)
- func (client *Client) UpdateCheckServiceOwnership(input CheckServiceOwnershipUpdateInput) (*Check, error)
- func (client *Client) UpdateCheckServiceProperty(input CheckServicePropertyUpdateInput) (*Check, error)
- func (client *Client) UpdateCheckTagDefined(input CheckTagDefinedUpdateInput) (*Check, error)
- func (client *Client) UpdateCheckToolUsage(input CheckToolUsageUpdateInput) (*Check, error)
- func (client *Client) UpdateContact(id ID, contact ContactInput) (*Contact, error)
- func (c *Client) UpdateDomain(identifier string, input DomainInput) (*Domain, error)
- func (client *Client) UpdateFilter(input FilterUpdateInput) (*Filter, error)
- func (client *Client) UpdateGroup(identifier string, input GroupInput) (*Group, error)
- func (client *Client) UpdateLevel(input LevelUpdateInput) (*Level, error)
- func (client *Client) UpdateService(input ServiceUpdateInput) (*Service, error)
- func (client *Client) UpdateServiceRepository(input ServiceRepositoryUpdateInput) (*ServiceRepository, error)
- func (c *Client) UpdateSystem(identifier string, input SystemInput) (*System, error)
- func (client *Client) UpdateTag(input TagUpdateInput) (*Tag, error)
- func (client *Client) UpdateTeam(input TeamUpdateInput) (*Team, error)
- func (client *Client) UpdateTool(input ToolUpdateInput) (*Tool, error)
- func (client *Client) UpdateTriggerDefinition(input CustomActionsTriggerDefinitionUpdateInput) (*CustomActionsTriggerDefinition, error)
- func (client *Client) UpdateUser(user string, input UserInput) (*User, error)
- func (client *Client) UpdateWebhookAction(input CustomActionsWebhookActionUpdateInput) (*CustomActionsExternalAction, error)
- func (client *Client) Validate() error
- type ClientSettings
- type ConnectiveEnum
- type Contact
- type ContactCreateInput
- type ContactDeleteInput
- type ContactInput
- type ContactType
- type ContactUpdateInput
- type CustomActionsEntityTypeEnum
- type CustomActionsExternalAction
- type CustomActionsExternalActionsConnection
- type CustomActionsHttpMethodEnum
- type CustomActionsId
- type CustomActionsTriggerDefinition
- type CustomActionsTriggerDefinitionAccessControlEnum
- type CustomActionsTriggerDefinitionCreateInput
- type CustomActionsTriggerDefinitionUpdateInput
- type CustomActionsTriggerDefinitionsConnection
- type CustomActionsTriggerEventStatusEnum
- type CustomActionsWebhookAction
- type CustomActionsWebhookActionCreateInput
- type CustomActionsWebhookActionUpdateInput
- type CustomEventCheckFragment
- type DeleteInput
- type Domain
- type DomainConnection
- type DomainId
- type DomainInput
- type EntityOwner
- type Filter
- type FilterConnection
- type FilterCreateInput
- type FilterId
- type FilterPredicate
- type FilterUpdateInput
- type FrequencyTimeScale
- type GitBranchProtectionCheckFragment
- type Group
- func (g *Group) ChildTeams(client *Client, variables *PayloadVariables) (*TeamConnection, error)
- func (g *Group) DescendantRepositories(client *Client, variables *PayloadVariables) (*RepositoryConnection, error)
- func (g *Group) DescendantServices(client *Client, variables *PayloadVariables) (*ServiceConnection, error)
- func (g *Group) DescendantSubgroups(client *Client, variables *PayloadVariables) (*GroupConnection, error)
- func (g *Group) DescendantTeams(client *Client, variables *PayloadVariables) (*TeamConnection, error)
- func (g *Group) Members(client *Client, variables *PayloadVariables) (*UserConnection, error)
- type GroupConnection
- type GroupId
- type GroupInput
- type HasDocumentationCheckFragment
- type HasDocumentationSubtypeEnum
- type HasDocumentationTypeEnum
- type HasRecentDeployCheckFragment
- type ID
- type Identifier
- type IdentifierInput
- type Integration
- type IntegrationConnection
- type JSON
- type Language
- type Level
- type LevelConnection
- type LevelCreateInput
- type LevelDeleteInput
- type LevelUpdateInput
- type Lifecycle
- type ManualCheckFragment
- type ManualCheckFrequency
- type ManualCheckFrequencyInput
- type MaturityReport
- type MemberInput
- type OpsLevelErrors
- type Option
- func SetAPIToken(apiToken string) Option
- func SetAPIVisibility(visibility string) Option
- func SetHeader(key string, value string) Option
- func SetHeaders(headers map[string]string) Option
- func SetMaxRetries(amount int) Option
- func SetPageSize(size int) Option
- func SetTimeout(amount time.Duration) Option
- func SetURL(url string) Option
- func SetUserAgentExtra(extra string) Option
- type PageInfo
- type PayloadSortEnum
- type PayloadVariables
- type Predicate
- type PredicateInput
- type PredicateKeyEnum
- type PredicateTypeEnum
- type PredicateUpdateInput
- type Repository
- func (r *Repository) GetService(service ID, directory string) *ServiceRepository
- func (r *Repository) GetServices(client *Client, variables *PayloadVariables) (*RepositoryServiceConnection, error)
- func (r *Repository) GetTags(client *Client, variables *PayloadVariables) (*RepositoryTagConnection, error)
- func (r *Repository) Hydrate(client *Client) error
- type RepositoryConnection
- type RepositoryFileCheckFragment
- type RepositoryGrepCheckFragment
- type RepositoryId
- type RepositoryPath
- type RepositorySearchCheckFragment
- type RepositoryServiceConnection
- type RepositoryServiceEdge
- type RepositoryTagConnection
- type RepositoryVisibilityEnum
- type ResourceDocumentStatusTypeEnum
- type RestResponse
- type Runner
- type RunnerAppendJobLogInput
- type RunnerJob
- type RunnerJobFile
- type RunnerJobOutcomeEnum
- type RunnerJobOutcomeVariable
- type RunnerJobStatusEnum
- type RunnerJobVariable
- type RunnerReportJobOutcomeInput
- type RunnerScale
- type RunnerStatusTypeEnum
- type Service
- func (s *Service) Documents(client *Client) ([]ServiceDocument, error)
- func (s *Service) GetDocuments(client *Client, variables *PayloadVariables) (*ServiceDocumentsConnection, error)
- func (s *Service) GetRepositories(client *Client, variables *PayloadVariables) (*ServiceRepositoryConnection, error)
- func (s *Service) GetTags(client *Client, variables *PayloadVariables) (*TagConnection, error)
- func (s *Service) GetTools(client *Client, variables *PayloadVariables) (*ToolConnection, error)
- func (s *Service) HasAlias(alias string) bool
- func (s *Service) HasTag(key string, value string) bool
- func (s *Service) HasTool(category ToolCategory, name string, environment string) bool
- func (s *Service) Hydrate(client *Client) error
- type ServiceConnection
- type ServiceCreateInput
- type ServiceDeleteInput
- type ServiceDocument
- type ServiceDocumentContent
- type ServiceDocumentSource
- type ServiceDocumentsConnection
- type ServiceId
- type ServiceMaturity
- type ServiceOwnershipCheckContactType
- type ServiceOwnershipCheckFragment
- type ServicePropertyCheckFragment
- type ServicePropertyTypeEnum
- type ServiceRepository
- type ServiceRepositoryConnection
- type ServiceRepositoryCreateInput
- type ServiceRepositoryEdge
- type ServiceRepositoryUpdateInput
- type ServiceSortEnum
- type ServiceUpdateInput
- type System
- type SystemConnection
- type SystemId
- type SystemInput
- type Tag
- type TagArgs
- type TagAssignInput
- type TagConnection
- type TagCreateInput
- type TagDefinedCheckFragment
- type TagDeleteInput
- type TagInput
- type TagOwner
- type TagUpdateInput
- type TaggableResource
- type Team
- type TeamConnection
- type TeamCreateInput
- type TeamDeleteInput
- type TeamId
- type TeamIdConnection
- type TeamMembershipCreateInput
- type TeamMembershipDeleteInput
- type TeamMembershipUserInput
- type TeamUpdateInput
- type Tier
- type Timestamps
- type Tool
- type ToolCategory
- type ToolConnection
- type ToolCreateInput
- type ToolDeleteInput
- type ToolUpdateInput
- type ToolUsageCheckFragment
- type User
- type UserConnection
- type UserId
- type UserIdentifierInput
- type UserInput
- type UserRole
Constants ¶
This section is empty.
Variables ¶
var AllAlertSourceStatusTypeEnum = []string{ string(AlertSourceStatusTypeEnumAlert), string(AlertSourceStatusTypeEnumFetchingData), string(AlertSourceStatusTypeEnumNoData), string(AlertSourceStatusTypeEnumOk), string(AlertSourceStatusTypeEnumWarn), }
All AlertSourceStatusTypeEnum as []string
var AllAlertSourceTypeEnum = []string{ string(AlertSourceTypeEnumDatadog), string(AlertSourceTypeEnumOpsgenie), string(AlertSourceTypeEnumPagerduty), }
All AlertSourceTypeEnum as []string
var AllAliasOwnerTypeEnum = []string{ string(AliasOwnerTypeEnumService), string(AliasOwnerTypeEnumTeam), }
All AliasOwnerTypeEnum as []string
var AllApiDocumentSourceEnum = []string{ string(ApiDocumentSourceEnumPull), string(ApiDocumentSourceEnumPush), }
All ApiDocumentSourceEnum as []string
var AllBasicTypeEnum = []string{ string(BasicTypeEnumDoesNotEqual), string(BasicTypeEnumEquals), }
All BasicTypeEnum as []string
var AllCampaignFilterEnum = []string{ string(CampaignFilterEnumID), string(CampaignFilterEnumOwner), string(CampaignFilterEnumStatus), }
All CampaignFilterEnum as []string
var AllCampaignReminderTypeEnum = []string{ string(CampaignReminderTypeEnumEmail), string(CampaignReminderTypeEnumSlack), }
All CampaignReminderTypeEnum as []string
var AllCampaignServiceStatusEnum = []string{ string(CampaignServiceStatusEnumFailing), string(CampaignServiceStatusEnumPassing), }
All CampaignServiceStatusEnum as []string
var AllCampaignSortEnum = []string{ string(CampaignSortEnumChecksPassingAsc), string(CampaignSortEnumChecksPassingDesc), string(CampaignSortEnumEndedDateAsc), string(CampaignSortEnumEndedDateDesc), string(CampaignSortEnumFilterAsc), string(CampaignSortEnumFilterDesc), string(CampaignSortEnumNameAsc), string(CampaignSortEnumNameDesc), string(CampaignSortEnumOwnerAsc), string(CampaignSortEnumOwnerDesc), string(CampaignSortEnumServicesCompleteAsc), string(CampaignSortEnumServicesCompleteDesc), string(CampaignSortEnumStartDateAsc), string(CampaignSortEnumStartDateDesc), string(CampaignSortEnumStatusAsc), string(CampaignSortEnumStatusDesc), string(CampaignSortEnumTargetDateAsc), string(CampaignSortEnumTargetDateDesc), }
All CampaignSortEnum as []string
var AllCampaignStatusEnum = []string{ string(CampaignStatusEnumDelayed), string(CampaignStatusEnumDraft), string(CampaignStatusEnumEnded), string(CampaignStatusEnumInProgress), string(CampaignStatusEnumScheduled), }
All CampaignStatusEnum as []string
var AllCheckStatus = []string{ string(CheckStatusFailed), string(CheckStatusPassed), string(CheckStatusPending), }
All CheckStatus as []string
var AllCheckType = []string{ string(CheckTypeAlertSourceUsage), string(CheckTypeCustom), string(CheckTypeGeneric), string(CheckTypeGitBranchProtection), string(CheckTypeHasDocumentation), string(CheckTypeHasOwner), string(CheckTypeHasRecentDeploy), string(CheckTypeHasRepository), string(CheckTypeHasServiceConfig), string(CheckTypeManual), string(CheckTypePayload), string(CheckTypeRepoFile), string(CheckTypeRepoGrep), string(CheckTypeRepoSearch), string(CheckTypeServiceDependency), string(CheckTypeServiceProperty), string(CheckTypeTagDefined), string(CheckTypeToolUsage), }
All CheckType as []string
var AllConnectiveEnum = []string{ string(ConnectiveEnumAnd), string(ConnectiveEnumOr), }
All ConnectiveEnum as []string
var AllContactType = []string{ string(ContactTypeEmail), string(ContactTypeGitHub), string(ContactTypeSlack), string(ContactTypeSlackHandle), string(ContactTypeWeb), }
All ContactType as []string
var AllCustomActionsEntityTypeEnum = []string{ string(CustomActionsEntityTypeEnumGlobal), string(CustomActionsEntityTypeEnumService), }
All CustomActionsEntityTypeEnum as []string
var AllCustomActionsHttpMethodEnum = []string{ string(CustomActionsHttpMethodEnumDelete), string(CustomActionsHttpMethodEnumGet), string(CustomActionsHttpMethodEnumPatch), string(CustomActionsHttpMethodEnumPost), string(CustomActionsHttpMethodEnumPut), }
All CustomActionsHttpMethodEnum as []string
var AllCustomActionsTriggerDefinitionAccessControlEnum = []string{ string(CustomActionsTriggerDefinitionAccessControlEnumAdmins), string(CustomActionsTriggerDefinitionAccessControlEnumEveryone), string(CustomActionsTriggerDefinitionAccessControlEnumServiceOwners), }
All CustomActionsTriggerDefinitionAccessControlEnum as []string
var AllCustomActionsTriggerEventStatusEnum = []string{ string(CustomActionsTriggerEventStatusEnumFailure), string(CustomActionsTriggerEventStatusEnumPending), string(CustomActionsTriggerEventStatusEnumSuccess), }
All CustomActionsTriggerEventStatusEnum as []string
var AllFrequencyTimeScale = []string{ string(FrequencyTimeScaleDay), string(FrequencyTimeScaleMonth), string(FrequencyTimeScaleWeek), string(FrequencyTimeScaleYear), }
All FrequencyTimeScale as []string
var AllHasDocumentationSubtypeEnum = []string{ string(HasDocumentationSubtypeEnumOpenapi), }
All HasDocumentationSubtypeEnum as []string
var AllHasDocumentationTypeEnum = []string{ string(HasDocumentationTypeEnumAPI), string(HasDocumentationTypeEnumTech), }
All HasDocumentationTypeEnum as []string
var AllPayloadSortEnum = []string{ string(PayloadSortEnumCreatedAtAsc), string(PayloadSortEnumCreatedAtDesc), string(PayloadSortEnumProcessedAtAsc), string(PayloadSortEnumProcessedAtDesc), }
All PayloadSortEnum as []string
var AllPredicateKeyEnum = []string{ string(PredicateKeyEnumCreationSource), string(PredicateKeyEnumFramework), string(PredicateKeyEnumGroupIDs), string(PredicateKeyEnumLanguage), string(PredicateKeyEnumLifecycleIndex), string(PredicateKeyEnumName), string(PredicateKeyEnumOwnerID), string(PredicateKeyEnumProduct), string(PredicateKeyEnumTags), string(PredicateKeyEnumTierIndex), string(PredicateKeyEnumDomainID), string(PredicateKeyEnumSystemID), }
All PredicateKeyEnum as []string
var AllPredicateTypeEnum = []string{ string(PredicateTypeEnumBelongsTo), string(PredicateTypeEnumContains), string(PredicateTypeEnumDoesNotContain), string(PredicateTypeEnumDoesNotEqual), string(PredicateTypeEnumDoesNotExist), string(PredicateTypeEnumEndsWith), string(PredicateTypeEnumEquals), string(PredicateTypeEnumExists), string(PredicateTypeEnumGreaterThanOrEqualTo), string(PredicateTypeEnumLessThanOrEqualTo), string(PredicateTypeEnumMatchesRegex), string(PredicateTypeEnumSatisfiesJqExpression), string(PredicateTypeEnumSatisfiesVersionConstraint), string(PredicateTypeEnumStartsWith), }
All PredicateTypeEnum as []string
var AllRepositoryVisibilityEnum = []string{ string(RepositoryVisibilityEnumInternal), string(RepositoryVisibilityEnumPrivate), string(RepositoryVisibilityEnumPublic), }
All RepositoryVisibilityEnum as []string
var AllResourceDocumentStatusTypeEnum = []string{ string(ResourceDocumentStatusTypeEnumHidden), string(ResourceDocumentStatusTypeEnumPinned), string(ResourceDocumentStatusTypeEnumVisible), }
All ResourceDocumentStatusTypeEnum as []string
var AllServiceOwnershipCheckContactType = []string{ string(ServiceOwnershipCheckContactTypeAny), string(ServiceOwnershipCheckContactTypeSlack), string(ServiceOwnershipCheckContactTypeSlackHandle), string(ServiceOwnershipCheckContactTypeEmail), string(ServiceOwnershipCheckContactTypeWeb), }
All ServiceOwnershipContactType as []string
var AllServicePropertyTypeEnum = []string{ string(ServicePropertyTypeEnumDescription), string(ServicePropertyTypeEnumFramework), string(ServicePropertyTypeEnumLanguage), string(ServicePropertyTypeEnumLifecycleIndex), string(ServicePropertyTypeEnumName), string(ServicePropertyTypeEnumNote), string(ServicePropertyTypeEnumProduct), string(ServicePropertyTypeEnumTierIndex), }
All ServicePropertyTypeEnum as []string
var AllServiceSortEnum = []string{ string(ServiceSortEnumAlertStatusAsc), string(ServiceSortEnumAlertStatusDesc), string(ServiceSortEnumChecksPassingAsc), string(ServiceSortEnumChecksPassingDesc), string(ServiceSortEnumLastDeployAsc), string(ServiceSortEnumLastDeployDesc), string(ServiceSortEnumLevelIndexAsc), string(ServiceSortEnumLevelIndexDesc), string(ServiceSortEnumLifecycleAsc), string(ServiceSortEnumLifecycleDesc), string(ServiceSortEnumNameAsc), string(ServiceSortEnumNameDesc), string(ServiceSortEnumOwnerAsc), string(ServiceSortEnumOwnerDesc), string(ServiceSortEnumProductAsc), string(ServiceSortEnumProductDesc), string(ServiceSortEnumServiceStatAsc), string(ServiceSortEnumServiceStatDesc), string(ServiceSortEnumTierAsc), string(ServiceSortEnumTierDesc), }
All ServiceSortEnum as []string
var AllTaggableResource = []string{ string(TaggableResourceRepository), string(TaggableResourceService), string(TaggableResourceTeam), }
All TaggableResource as []string
var AllToolCategory = []string{ string(ToolCategoryAdmin), string(ToolCategoryAPIDocumentation), string(ToolCategoryBacklog), string(ToolCategoryCode), string(ToolCategoryContinuousIntegration), string(ToolCategoryDeployment), string(ToolCategoryErrors), string(ToolCategoryFeatureFlag), string(ToolCategoryHealthChecks), string(ToolCategoryIncidents), string(ToolCategoryIssueTracking), string(ToolCategoryLogs), string(ToolCategoryMetrics), string(ToolCategoryOrchestrator), string(ToolCategoryOther), string(ToolCategoryResiliency), string(ToolCategoryRunbooks), string(ToolCategorySecurityScans), string(ToolCategoryStatusPage), string(ToolCategoryWiki), }
All ToolCategory as []string
var AllUserRole = []string{ string(UserRoleAdmin), string(UserRoleUser), }
All UserRole as []string
var Cache = &Cacher{ mutex: sync.Mutex{}, Tiers: make(map[string]Tier), Lifecycles: make(map[string]Lifecycle), Teams: make(map[string]Team), Categories: make(map[string]Category), Levels: make(map[string]Level), Filters: make(map[string]Filter), Integrations: make(map[string]Integration), Repositories: make(map[string]Repository), }
Functions ¶
func AllRunnerJobOutcomeEnum ¶
func AllRunnerJobOutcomeEnum() []string
All RunnerJobOutcomeEnum as []string
func AllRunnerJobStatusEnum ¶
func AllRunnerJobStatusEnum() []string
All RunnerJobStatusEnum as []string
func AllRunnerStatusTypeEnum ¶
func AllRunnerStatusTypeEnum() []string
All RunnerStatusTypeEnum as []string
func Bool ¶
Bool is a helper routine that allocates a new bool value to store v and returns a pointer to it.
func EmptyString ¶
func EmptyString() *string
TODO: this can be replaced with NewString when its no longer a graphql.String type
func FormatErrors ¶
func FormatErrors(errs []OpsLevelErrors) error
func HandleErrors ¶
func HandleErrors(err error, errs []OpsLevelErrors) error
func NewISO8601Date ¶
func NewISO8601DateNow ¶
func NewRestClient ¶
func NewRestClient(options ...Option) *resty.Client
func NullString ¶
func NullString() *string
Types ¶
type AlertSource ¶
type AlertSource struct { Name string `graphql:"name"` Description string `graphql:"description"` Id ID `graphql:"id"` Type AlertSourceTypeEnum `graphql:"type"` ExternalId string `graphql:"externalId"` Integration Integration `graphql:"integration"` Url string `graphql:"url"` }
type AlertSourceDeleteInput ¶ added in v2023.3.14
type AlertSourceDeleteInput struct {
Id ID `json:"id"`
}
type AlertSourceExternalIdentifier ¶
type AlertSourceExternalIdentifier struct { Type AlertSourceTypeEnum `json:"type"` ExternalId string `json:"externalId"` }
func NewAlertSource ¶ added in v2023.3.14
func NewAlertSource(kind AlertSourceTypeEnum, id string) *AlertSourceExternalIdentifier
type AlertSourceService ¶ added in v2023.3.14
type AlertSourceService struct { AlertSource AlertSource `graphql:"alertSource"` Id ID `graphql:"id"` Service ServiceId `graphql:"service"` Status AlertSourceStatusTypeEnum `graphql:"status"` }
type AlertSourceServiceCreateInput ¶ added in v2023.3.14
type AlertSourceServiceCreateInput struct { Service IdentifierInput `json:"service"` Id ID `json:"alertSourceId,omitempty"` ExternalID *AlertSourceExternalIdentifier `json:"alertSourceExternalIdentifier,omitempty"` }
type AlertSourceStatusTypeEnum ¶ added in v2023.3.14
type AlertSourceStatusTypeEnum string
AlertSourceTypeEnum The monitor status level.
const ( AlertSourceStatusTypeEnumAlert AlertSourceStatusTypeEnum = "alert" // Monitor is reporting an alert. AlertSourceStatusTypeEnumFetchingData AlertSourceStatusTypeEnum = "fetching_data" // Monitor currently being updated. AlertSourceStatusTypeEnumNoData AlertSourceStatusTypeEnum = "no_data" // No data received yet. Ensure your monitors are configured correctly. AlertSourceStatusTypeEnumOk AlertSourceStatusTypeEnum = "ok" // Monitor is not reporting any warnings or alerts. AlertSourceStatusTypeEnumWarn AlertSourceStatusTypeEnum = "warn" // Monitor is reporting a warning. )
type AlertSourceTypeEnum ¶
type AlertSourceTypeEnum string
AlertSourceTypeEnum represents the type of the alert source.
const ( AlertSourceTypeEnumDatadog AlertSourceTypeEnum = "datadog" // A Datadog alert source (aka monitor). AlertSourceTypeEnumOpsgenie AlertSourceTypeEnum = "opsgenie" // An Opsgenie alert source (aka service). AlertSourceTypeEnumPagerduty AlertSourceTypeEnum = "pagerduty" // A PagerDuty alert source (aka service). )
type AlertSourceUsageCheckFragment ¶
type AlertSourceUsageCheckFragment struct { AlertSourceNamePredicate Predicate `graphql:"alertSourceNamePredicate"` AlertSourceType AlertSourceTypeEnum `graphql:"alertSourceType"` }
type AliasCreateInput ¶
type AliasDeleteInput ¶
type AliasDeleteInput struct { Alias string `json:"alias"` OwnerType AliasOwnerTypeEnum `json:"ownerType"` }
type AliasOwnerTypeEnum ¶
type AliasOwnerTypeEnum string
AliasOwnerTypeEnum represents the owner type an alias is assigned to.
const ( AliasOwnerTypeEnumService AliasOwnerTypeEnum = "service" // Aliases that are assigned to services. AliasOwnerTypeEnumTeam AliasOwnerTypeEnum = "team" // Aliases that are assigned to teams. )
type ApiDocumentSourceEnum ¶
type ApiDocumentSourceEnum string
ApiDocumentSourceEnum represents the source used to determine the preferred API document.
const ( ApiDocumentSourceEnumPull ApiDocumentSourceEnum = "PULL" // Use the document that was pulled by OpsLevel via a repo. ApiDocumentSourceEnumPush ApiDocumentSourceEnum = "PUSH" // Use the document that was pushed to OpsLevel via an API Docs integration. )
type BasicTypeEnum ¶ added in v2023.3.14
type BasicTypeEnum string
BasicTypeEnum
const ( BasicTypeEnumDoesNotEqual BasicTypeEnum = "does_not_equal" // BasicTypeEnumEquals BasicTypeEnum = "equals" // )
type Cacher ¶
type Cacher struct { Tiers map[string]Tier Lifecycles map[string]Lifecycle Teams map[string]Team Categories map[string]Category Levels map[string]Level Filters map[string]Filter Integrations map[string]Integration Repositories map[string]Repository // contains filtered or unexported fields }
func (*Cacher) CacheCategories ¶
func (*Cacher) CacheFilters ¶
func (*Cacher) CacheIntegrations ¶
func (*Cacher) CacheLevels ¶
func (*Cacher) CacheLifecycles ¶
func (*Cacher) CacheRepositories ¶
func (*Cacher) CacheTeams ¶
func (*Cacher) CacheTiers ¶
func (*Cacher) TryGetIntegration ¶
func (c *Cacher) TryGetIntegration(alias string) (*Integration, bool)
func (*Cacher) TryGetRepository ¶
func (c *Cacher) TryGetRepository(alias string) (*Repository, bool)
type CampaignFilterEnum ¶ added in v2023.3.14
type CampaignFilterEnum string
CampaignFilterEnum
const ( CampaignFilterEnumID CampaignFilterEnum = "id" // CampaignFilterEnumOwner CampaignFilterEnum = "owner" // CampaignFilterEnumStatus CampaignFilterEnum = "status" // )
type CampaignReminderTypeEnum ¶ added in v2023.3.14
type CampaignReminderTypeEnum string
CampaignReminderTypeEnum
const ( CampaignReminderTypeEnumEmail CampaignReminderTypeEnum = "email" // CampaignReminderTypeEnumSlack CampaignReminderTypeEnum = "slack" // )
type CampaignServiceStatusEnum ¶ added in v2023.3.14
type CampaignServiceStatusEnum string
CampaignServiceStatusEnum
const ( CampaignServiceStatusEnumFailing CampaignServiceStatusEnum = "failing" // CampaignServiceStatusEnumPassing CampaignServiceStatusEnum = "passing" // )
type CampaignSortEnum ¶ added in v2023.3.14
type CampaignSortEnum string
CampaignSortEnum
const ( CampaignSortEnumChecksPassingAsc CampaignSortEnum = "checks_passing_ASC" // CampaignSortEnumChecksPassingDesc CampaignSortEnum = "checks_passing_DESC" // CampaignSortEnumEndedDateAsc CampaignSortEnum = "ended_date_ASC" // CampaignSortEnumEndedDateDesc CampaignSortEnum = "ended_date_DESC" // CampaignSortEnumFilterAsc CampaignSortEnum = "filter_ASC" // CampaignSortEnumFilterDesc CampaignSortEnum = "filter_DESC" // CampaignSortEnumNameAsc CampaignSortEnum = "name_ASC" // CampaignSortEnumNameDesc CampaignSortEnum = "name_DESC" // CampaignSortEnumOwnerAsc CampaignSortEnum = "owner_ASC" // CampaignSortEnumOwnerDesc CampaignSortEnum = "owner_DESC" // CampaignSortEnumServicesCompleteAsc CampaignSortEnum = "services_complete_ASC" // CampaignSortEnumServicesCompleteDesc CampaignSortEnum = "services_complete_DESC" // CampaignSortEnumStartDateAsc CampaignSortEnum = "start_date_ASC" // CampaignSortEnumStartDateDesc CampaignSortEnum = "start_date_DESC" // CampaignSortEnumStatusAsc CampaignSortEnum = "status_ASC" // CampaignSortEnumStatusDesc CampaignSortEnum = "status_DESC" // CampaignSortEnumTargetDateAsc CampaignSortEnum = "target_date_ASC" // CampaignSortEnumTargetDateDesc CampaignSortEnum = "target_date_DESC" // )
type CampaignStatusEnum ¶ added in v2023.3.14
type CampaignStatusEnum string
CampaignStatusEnum
const ( CampaignStatusEnumDelayed CampaignStatusEnum = "delayed" // CampaignStatusEnumDraft CampaignStatusEnum = "draft" // CampaignStatusEnumEnded CampaignStatusEnum = "ended" // CampaignStatusEnumInProgress CampaignStatusEnum = "in_progress" // CampaignStatusEnumScheduled CampaignStatusEnum = "scheduled" // )
type CategoryBreakdown ¶
type CategoryConnection ¶
type CategoryCreateInput ¶
type CategoryCreateInput struct {
Name string `json:"name"`
}
type CategoryDeleteInput ¶
type CategoryDeleteInput struct {
Id ID `json:"id"`
}
type CategoryUpdateInput ¶
type Check ¶
type Check struct { Category Category `graphql:"category"` Description string `graphql:"description"` Enabled bool `graphql:"enabled"` EnableOn iso8601.Time `graphql:"enableOn"` Filter Filter `graphql:"filter"` Id ID `graphql:"id"` Level Level `graphql:"level"` Name string `graphql:"name"` Notes string `graphql:"notes"` Owner CheckOwner `graphql:"owner"` Type CheckType `graphql:"type"` AlertSourceUsageCheckFragment `graphql:"... on AlertSourceUsageCheck"` CustomEventCheckFragment `graphql:"... on CustomEventCheck"` HasRecentDeployCheckFragment `graphql:"... on HasRecentDeployCheck"` ManualCheckFragment `graphql:"... on ManualCheck"` RepositoryFileCheckFragment `graphql:"... on RepositoryFileCheck"` RepositoryGrepCheckFragment `graphql:"... on RepositoryGrepCheck"` RepositorySearchCheckFragment `graphql:"... on RepositorySearchCheck"` ServiceOwnershipCheckFragment `graphql:"... on ServiceOwnershipCheck"` ServicePropertyCheckFragment `graphql:"... on ServicePropertyCheck"` TagDefinedCheckFragment `graphql:"... on TagDefinedCheck"` ToolUsageCheckFragment `graphql:"... on ToolUsageCheck"` HasDocumentationCheckFragment `graphql:"... on HasDocumentationCheck"` }
type CheckAlertSourceUsageCreateInput ¶
type CheckAlertSourceUsageCreateInput struct { CheckCreateInput AlertSourceType AlertSourceTypeEnum `json:"alertSourceType,omitempty"` AlertSourceNamePredicate *PredicateInput `json:"alertSourceNamePredicate,omitempty"` }
type CheckAlertSourceUsageUpdateInput ¶
type CheckAlertSourceUsageUpdateInput struct { CheckUpdateInput AlertSourceType AlertSourceTypeEnum `json:"alertSourceType,omitempty"` AlertSourceNamePredicate *PredicateUpdateInput `json:"alertSourceNamePredicate,omitempty"` }
type CheckConnection ¶
type CheckCreateInput ¶
type CheckCreateInput struct { Name string `json:"name"` Enabled bool `json:"enabled"` EnableOn *iso8601.Time `json:"enableOn,omitempty"` Category ID `json:"categoryId"` Level ID `json:"levelId"` Owner *ID `json:"ownerId,omitempty"` Filter *ID `json:"filterId,omitempty"` Notes string `json:"notes"` }
func (*CheckCreateInput) GetCheckCreateInput ¶
func (c *CheckCreateInput) GetCheckCreateInput() *CheckCreateInput
type CheckCreateInputProvider ¶
type CheckCreateInputProvider interface {
GetCheckCreateInput() *CheckCreateInput
}
type CheckCustomEventUpdateInput ¶
type CheckCustomEventUpdateInput struct { CheckUpdateInput ServiceSelector string `json:"serviceSelector,omitempty"` SuccessCondition string `json:"successCondition,omitempty"` Message *string `json:"resultMessage,omitempty"` PassPending *bool `json:"passPending,omitempty"` Integration *ID `json:"integrationId,omitempty"` }
type CheckDeleteInput ¶
type CheckDeleteInput struct {
Id ID `json:"id"`
}
type CheckGitBranchProtectionCreateInput ¶
type CheckGitBranchProtectionCreateInput struct {
CheckCreateInput
}
type CheckGitBranchProtectionUpdateInput ¶
type CheckGitBranchProtectionUpdateInput struct {
CheckUpdateInput
}
type CheckHasDocumentationCreateInput ¶
type CheckHasDocumentationCreateInput struct { CheckCreateInput DocumentType HasDocumentationTypeEnum `json:"documentType"` DocumentSubtype HasDocumentationSubtypeEnum `json:"documentSubtype"` }
type CheckHasDocumentationUpdateInput ¶
type CheckHasDocumentationUpdateInput struct { CheckUpdateInput DocumentType HasDocumentationTypeEnum `json:"documentType"` DocumentSubtype HasDocumentationSubtypeEnum `json:"documentSubtype"` }
type CheckHasRecentDeployCreateInput ¶
type CheckHasRecentDeployCreateInput struct { CheckCreateInput Days int `json:"days"` }
type CheckHasRecentDeployUpdateInput ¶
type CheckHasRecentDeployUpdateInput struct { CheckUpdateInput Days *int `json:"days,omitempty"` }
type CheckManualCreateInput ¶
type CheckManualCreateInput struct { CheckCreateInput UpdateFrequency *ManualCheckFrequencyInput `json:"updateFrequency,omitempty"` UpdateRequiresComment bool `json:"updateRequiresComment"` }
type CheckManualUpdateInput ¶
type CheckManualUpdateInput struct { CheckUpdateInput UpdateFrequency *ManualCheckFrequencyInput `json:"updateFrequency,omitempty"` UpdateRequiresComment bool `json:"updateRequiresComment,omitempty"` }
type CheckOwner ¶
type CheckOwner struct {
Team TeamId `graphql:"... on Team"`
}
type CheckRepositoryFileCreateInput ¶
type CheckRepositoryFileCreateInput struct { CheckCreateInput DirectorySearch bool `json:"directorySearch"` Filepaths []string `json:"filePaths"` FileContentsPredicate *PredicateInput `json:"fileContentsPredicate,omitempty"` UseAbsoluteRoot *bool `json:"useAbsoluteRoot,omitempty"` }
type CheckRepositoryFileUpdateInput ¶
type CheckRepositoryFileUpdateInput struct { CheckUpdateInput DirectorySearch *bool `json:"directorySearch,omitempty"` Filepaths []string `json:"filePaths,omitempty"` FileContentsPredicate *PredicateInput `json:"fileContentsPredicate,omitempty"` UseAbsoluteRoot *bool `json:"useAbsoluteRoot,omitempty"` }
type CheckRepositoryGrepCreateInput ¶
type CheckRepositoryGrepCreateInput struct { CheckCreateInput DirectorySearch bool `json:"directorySearch"` Filepaths []string `json:"filePaths"` FileContentsPredicate *PredicateInput `json:"fileContentsPredicate,omitempty"` }
type CheckRepositoryGrepUpdateInput ¶
type CheckRepositoryGrepUpdateInput struct { CheckUpdateInput DirectorySearch bool `json:"directorySearch"` Filepaths []string `json:"filePaths,omitempty"` FileContentsPredicate *PredicateInput `json:"fileContentsPredicate,omitempty"` }
type CheckRepositoryIntegratedCreateInput ¶
type CheckRepositoryIntegratedCreateInput struct {
CheckCreateInput
}
type CheckRepositoryIntegratedUpdateInput ¶
type CheckRepositoryIntegratedUpdateInput struct {
CheckUpdateInput
}
type CheckRepositorySearchCreateInput ¶
type CheckRepositorySearchCreateInput struct { CheckCreateInput FileExtensions []string `json:"fileExtensions,omitempty"` FileContentsPredicate PredicateInput `json:"fileContentsPredicate"` }
type CheckRepositorySearchUpdateInput ¶
type CheckRepositorySearchUpdateInput struct { CheckUpdateInput FileExtensions []string `json:"fileExtensions,omitempty"` FileContentsPredicate *PredicateInput `json:"fileContentsPredicate,omitempty"` }
type CheckResponsePayload ¶
type CheckResponsePayload struct { Check Check Errors []OpsLevelErrors }
Encompass CheckCreatePayload and CheckUpdatePayload into 1 struct
type CheckServiceConfigurationCreateInput ¶
type CheckServiceConfigurationCreateInput struct {
CheckCreateInput
}
type CheckServiceConfigurationUpdateInput ¶
type CheckServiceConfigurationUpdateInput struct {
CheckUpdateInput
}
type CheckServiceDependencyCreateInput ¶
type CheckServiceDependencyCreateInput struct {
CheckCreateInput
}
type CheckServiceDependencyUpdateInput ¶
type CheckServiceDependencyUpdateInput struct {
CheckUpdateInput
}
type CheckServiceOwnershipCreateInput ¶
type CheckServiceOwnershipCreateInput struct { CheckCreateInput RequireContactMethod *bool `json:"requireContactMethod,omitempty"` ContactMethod *ServiceOwnershipCheckContactType `json:"contactMethod,omitempty"` TeamTagKey string `json:"tagKey,omitempty"` TeamTagPredicate *PredicateInput `json:"tagPredicate,omitempty"` }
type CheckServiceOwnershipUpdateInput ¶
type CheckServiceOwnershipUpdateInput struct { CheckUpdateInput RequireContactMethod *bool `json:"requireContactMethod,omitempty"` ContactMethod *ServiceOwnershipCheckContactType `json:"contactMethod,omitempty"` TeamTagKey string `json:"tagKey,omitempty"` TeamTagPredicate *PredicateUpdateInput `json:"tagPredicate,omitempty"` }
type CheckServicePropertyCreateInput ¶
type CheckServicePropertyCreateInput struct { CheckCreateInput Property ServicePropertyTypeEnum `json:"serviceProperty"` Predicate *PredicateInput `json:"propertyValuePredicate,omitempty"` }
type CheckServicePropertyUpdateInput ¶
type CheckServicePropertyUpdateInput struct { CheckUpdateInput Property ServicePropertyTypeEnum `json:"serviceProperty,omitempty"` Predicate *PredicateInput `json:"propertyValuePredicate,omitempty"` }
type CheckStatus ¶
type CheckStatus string
CheckStatus represents the evaluation status of the check.
const ( CheckStatusFailed CheckStatus = "failed" // The check evaluated to a falsy value based on some conditions. CheckStatusPassed CheckStatus = "passed" // The check evaluated to a truthy value based on some conditions. CheckStatusPending CheckStatus = "pending" // The check has not been evaluated yet.. )
type CheckTagDefinedCreateInput ¶
type CheckTagDefinedCreateInput struct { CheckCreateInput TagKey string `json:"tagKey"` TagPredicate *PredicateInput `json:"tagPredicate,omitempty"` }
type CheckTagDefinedUpdateInput ¶
type CheckTagDefinedUpdateInput struct { CheckUpdateInput TagKey string `json:"tagKey,omitempty"` TagPredicate *PredicateInput `json:"tagPredicate,omitempty"` }
type CheckToolUsageCreateInput ¶
type CheckToolUsageCreateInput struct { CheckCreateInput ToolCategory ToolCategory `json:"toolCategory"` ToolNamePredicate *PredicateInput `json:"toolNamePredicate,omitempty"` ToolUrlPredicate *PredicateInput `json:"toolUrlPredicate,omitempty"` EnvironmentPredicate *PredicateInput `json:"environmentPredicate,omitempty"` }
type CheckToolUsageUpdateInput ¶
type CheckToolUsageUpdateInput struct { CheckUpdateInput ToolCategory ToolCategory `json:"toolCategory,omitempty"` ToolNamePredicate *PredicateInput `json:"toolNamePredicate,omitempty"` ToolUrlPredicate *PredicateInput `json:"toolUrlPredicate,omitempty"` EnvironmentPredicate *PredicateInput `json:"environmentPredicate,omitempty"` }
type CheckType ¶
type CheckType string
CheckType represents the type of check.
const ( CheckTypeAlertSourceUsage CheckType = "alert_source_usage" // Verifies that the service has an alert source of a particular type or name. CheckTypeCustom CheckType = "custom" // Allows for the creation of programmatic checks that use an API to mark the status as passing or failing. CheckTypeGeneric CheckType = "generic" // Requires a generic integration api call to complete a series of checks for multiple services. CheckTypeGitBranchProtection CheckType = "git_branch_protection" // Verifies that all the repositories on the service have branch protection enabled. CheckTypeHasDocumentation CheckType = "has_documentation" // Verifies that the service has visible documentation of a particular type and subtype. CheckTypeHasOwner CheckType = "has_owner" // Verifies that the service has an owner defined. CheckTypeHasRecentDeploy CheckType = "has_recent_deploy" // Verified that the services has received a deploy within a specified number of days. CheckTypeHasRepository CheckType = "has_repository" // Verifies that the service has a repository integrated. CheckTypeHasServiceConfig CheckType = "has_service_config" // Verifies that the service is maintained though the use of an opslevel.yml service config. CheckTypeManual CheckType = "manual" // Requires a service owner to manually complete a check for the service. CheckTypePayload CheckType = "payload" // Requires a payload integration api call to complete a check for the service. CheckTypeRepoFile CheckType = "repo_file" // Verifies that the service's repository contains a file with a certain path. (Optional: Can also be used to check for specific file contents). CheckTypeRepoGrep CheckType = "repo_grep" // Runs a comprehensive search across the service's repository with advanced search parameters. CheckTypeRepoSearch CheckType = "repo_search" // Searches the service's repository and verifies if any file matches the given contents. CheckTypeServiceDependency CheckType = "service_dependency" // Verifies that the service has either a dependent or dependency. CheckTypeServiceProperty CheckType = "service_property" // Verifies that a service property is set or matches a specified format. CheckTypeTagDefined CheckType = "tag_defined" // Verifies that the service has the specified tag defined. CheckTypeToolUsage CheckType = "tool_usage" // Verifies that the service is using a tool of a particular category or name. )
type CheckUpdateInput ¶
type CheckUpdateInput struct { Id ID `json:"id"` Name string `json:"name,omitempty"` Enabled *bool `json:"enabled,omitempty"` EnableOn *iso8601.Time `json:"enableOn,omitempty"` Category ID `json:"categoryId,omitempty"` Level ID `json:"levelId,omitempty"` Owner *ID `json:"ownerId,omitempty"` Filter *ID `json:"filterId,omitempty"` Notes *string `json:"notes,omitempty"` }
func (*CheckUpdateInput) GetCheckUpdateInput ¶
func (c *CheckUpdateInput) GetCheckUpdateInput() *CheckUpdateInput
type CheckUpdateInputProvider ¶
type CheckUpdateInputProvider interface {
GetCheckUpdateInput() *CheckUpdateInput
}
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewGQLClient ¶
func (*Client) AddContact ¶
func (client *Client) AddContact(team string, contact ContactInput) (*Contact, error)
func (*Client) AddMembers ¶
func (*Client) AssignTag ¶ added in v2023.3.14
func (client *Client) AssignTag(input TagAssignInput) ([]Tag, error)
func (*Client) AssignTags ¶
func (*Client) ConnectServiceRepository ¶
func (client *Client) ConnectServiceRepository(service *ServiceId, repository *Repository) (*ServiceRepository, error)
func (*Client) CreateAlertSourceService ¶ added in v2023.3.14
func (client *Client) CreateAlertSourceService(input AlertSourceServiceCreateInput) (*AlertSourceService, error)
func (*Client) CreateAlias ¶
func (client *Client) CreateAlias(input AliasCreateInput) ([]string, error)
func (*Client) CreateAliases ¶
#region Create TODO: make sure duplicate aliases throw an error that we can catch
func (*Client) CreateCategory ¶
func (client *Client) CreateCategory(input CategoryCreateInput) (*Category, error)
func (*Client) CreateCheckAlertSourceUsage ¶
func (client *Client) CreateCheckAlertSourceUsage(input CheckAlertSourceUsageCreateInput) (*Check, error)
func (*Client) CreateCheckCustomEvent ¶
func (client *Client) CreateCheckCustomEvent(input CheckCustomEventCreateInput) (*Check, error)
func (*Client) CreateCheckGitBranchProtection ¶
func (client *Client) CreateCheckGitBranchProtection(input CheckGitBranchProtectionCreateInput) (*Check, error)
func (*Client) CreateCheckHasDocumentation ¶
func (client *Client) CreateCheckHasDocumentation(input CheckHasDocumentationCreateInput) (*Check, error)
func (*Client) CreateCheckHasRecentDeploy ¶
func (client *Client) CreateCheckHasRecentDeploy(input CheckHasRecentDeployCreateInput) (*Check, error)
func (*Client) CreateCheckManual ¶
func (client *Client) CreateCheckManual(input CheckManualCreateInput) (*Check, error)
func (*Client) CreateCheckRepositoryFile ¶
func (client *Client) CreateCheckRepositoryFile(input CheckRepositoryFileCreateInput) (*Check, error)
func (*Client) CreateCheckRepositoryGrep ¶
func (client *Client) CreateCheckRepositoryGrep(input CheckRepositoryGrepCreateInput) (*Check, error)
func (*Client) CreateCheckRepositoryIntegrated ¶
func (client *Client) CreateCheckRepositoryIntegrated(input CheckRepositoryIntegratedCreateInput) (*Check, error)
func (*Client) CreateCheckRepositorySearch ¶
func (client *Client) CreateCheckRepositorySearch(input CheckRepositorySearchCreateInput) (*Check, error)
func (*Client) CreateCheckServiceConfiguration ¶
func (client *Client) CreateCheckServiceConfiguration(input CheckServiceConfigurationCreateInput) (*Check, error)
func (*Client) CreateCheckServiceDependency ¶
func (client *Client) CreateCheckServiceDependency(input CheckServiceDependencyCreateInput) (*Check, error)
func (*Client) CreateCheckServiceOwnership ¶
func (client *Client) CreateCheckServiceOwnership(input CheckServiceOwnershipCreateInput) (*Check, error)
func (*Client) CreateCheckServiceProperty ¶
func (client *Client) CreateCheckServiceProperty(input CheckServicePropertyCreateInput) (*Check, error)
func (*Client) CreateCheckTagDefined ¶
func (client *Client) CreateCheckTagDefined(input CheckTagDefinedCreateInput) (*Check, error)
func (*Client) CreateCheckToolUsage ¶
func (client *Client) CreateCheckToolUsage(input CheckToolUsageCreateInput) (*Check, error)
func (*Client) CreateDomain ¶ added in v2023.4.11
func (c *Client) CreateDomain(input DomainInput) (*Domain, error)
func (*Client) CreateFilter ¶
func (client *Client) CreateFilter(input FilterCreateInput) (*Filter, error)
func (*Client) CreateGroup ¶
func (client *Client) CreateGroup(input GroupInput) (*Group, error)
func (*Client) CreateLevel ¶
func (client *Client) CreateLevel(input LevelCreateInput) (*Level, error)
func (*Client) CreateService ¶
func (client *Client) CreateService(input ServiceCreateInput) (*Service, error)
func (*Client) CreateServiceRepository ¶
func (client *Client) CreateServiceRepository(input ServiceRepositoryCreateInput) (*ServiceRepository, error)
func (*Client) CreateSystem ¶ added in v2023.4.11
func (c *Client) CreateSystem(input SystemInput) (*System, error)
func (*Client) CreateTags ¶
func (*Client) CreateTeam ¶
func (client *Client) CreateTeam(input TeamCreateInput) (*Team, error)
func (*Client) CreateTool ¶
func (client *Client) CreateTool(input ToolCreateInput) (*Tool, error)
func (*Client) CreateTriggerDefinition ¶
func (client *Client) CreateTriggerDefinition(input CustomActionsTriggerDefinitionCreateInput) (*CustomActionsTriggerDefinition, error)
func (*Client) CreateWebhookAction ¶
func (client *Client) CreateWebhookAction(input CustomActionsWebhookActionCreateInput) (*CustomActionsExternalAction, error)
func (*Client) DeleteAlertSourceService ¶ added in v2023.3.14
func (*Client) DeleteAlias ¶
func (client *Client) DeleteAlias(input AliasDeleteInput) error
func (*Client) DeleteCategory ¶
func (*Client) DeleteCheck ¶
func (*Client) DeleteDomain ¶ added in v2023.4.11
func (*Client) DeleteFilter ¶
func (*Client) DeleteGroup ¶
func (*Client) DeleteGroupWithAlias
deprecated
func (*Client) DeleteLevel ¶
func (*Client) DeleteService ¶
func (client *Client) DeleteService(input ServiceDeleteInput) error
TODO: we should have a method that takes and ID and that follows the convention of other delete functions
func (*Client) DeleteServiceAlias ¶
func (*Client) DeleteServiceRepository ¶
func (*Client) DeleteServiceWithAlias ¶
func (*Client) DeleteSystem ¶ added in v2023.4.11
func (*Client) DeleteTeam ¶
func (*Client) DeleteTeamAlias ¶
func (*Client) DeleteTeamWithAlias ¶
func (*Client) DeleteTeamWithId
deprecated
func (*Client) DeleteTool ¶
func (*Client) DeleteTriggerDefinition ¶
func (client *Client) DeleteTriggerDefinition(input IdentifierInput) error
func (*Client) DeleteUser ¶
func (*Client) DeleteWebhookAction ¶
func (client *Client) DeleteWebhookAction(input IdentifierInput) error
func (*Client) ExecRawCTX ¶ added in v2023.3.14
func (*Client) GetAlertSource ¶
func (client *Client) GetAlertSource(id ID) (*AlertSource, error)
func (*Client) GetAlertSourceWithExternalIdentifier ¶
func (client *Client) GetAlertSourceWithExternalIdentifier(input AlertSourceExternalIdentifier) (*AlertSource, error)
func (*Client) GetCustomAction ¶
func (client *Client) GetCustomAction(input IdentifierInput) (*CustomActionsExternalAction, error)
func (*Client) GetGroupWithAlias ¶
func (*Client) GetIntegration ¶
func (client *Client) GetIntegration(id ID) (*Integration, error)
func (*Client) GetRepository ¶
func (client *Client) GetRepository(id ID) (*Repository, error)
func (*Client) GetRepositoryWithAlias ¶
func (client *Client) GetRepositoryWithAlias(alias string) (*Repository, error)
func (*Client) GetServiceCount ¶
func (*Client) GetServiceIdWithAlias ¶
This is a lightweight api call to lookup a service id by and alias - it does not return a full Service object
func (*Client) GetServiceMaturityWithAlias ¶
func (c *Client) GetServiceMaturityWithAlias(alias string) (*ServiceMaturity, error)
func (*Client) GetServiceWithAlias ¶
func (*Client) GetServiceWithId
deprecated
func (*Client) GetTagCount
deprecated
func (*Client) GetTagsForService
deprecated
func (*Client) GetTagsForServiceWithAlias
deprecated
func (*Client) GetTagsForServiceWithId
deprecated
func (*Client) GetTeamCount ¶
func (*Client) GetTeamWithAlias ¶
func (*Client) GetTeamWithId
deprecated
func (*Client) GetToolCount
deprecated
func (*Client) GetToolsForService
deprecated
func (client *Client) GetToolsForService(id ID, variables *PayloadVariables) ([]Tool, error)
Deprecated: Use client.GetService(id).Tools instead
func (*Client) GetToolsForServiceWithAlias
deprecated
func (*Client) GetToolsForServiceWithId
deprecated
func (*Client) GetTriggerDefinition ¶
func (client *Client) GetTriggerDefinition(input IdentifierInput) (*CustomActionsTriggerDefinition, error)
func (*Client) InitialPageVariables ¶
func (client *Client) InitialPageVariables() PayloadVariables
func (*Client) InitialPageVariablesPointer ¶
func (client *Client) InitialPageVariablesPointer() *PayloadVariables
func (*Client) InviteUser ¶
func (*Client) ListCategories ¶
func (client *Client) ListCategories(variables *PayloadVariables) (*CategoryConnection, error)
func (*Client) ListChecks ¶
func (client *Client) ListChecks(variables *PayloadVariables) (CheckConnection, error)
func (*Client) ListCustomActions ¶
func (client *Client) ListCustomActions(variables *PayloadVariables) (CustomActionsExternalActionsConnection, error)
func (*Client) ListDomains ¶ added in v2023.4.11
func (c *Client) ListDomains(variables *PayloadVariables) (*DomainConnection, error)
func (*Client) ListFilters ¶
func (client *Client) ListFilters(variables *PayloadVariables) (FilterConnection, error)
func (*Client) ListGroups ¶
func (client *Client) ListGroups(variables *PayloadVariables) (GroupConnection, error)
func (*Client) ListIntegrations ¶
func (client *Client) ListIntegrations(variables *PayloadVariables) (IntegrationConnection, error)
func (*Client) ListLevels ¶
func (*Client) ListLifecycles ¶
func (*Client) ListRepositories ¶
func (client *Client) ListRepositories(variables *PayloadVariables) (*RepositoryConnection, error)
func (*Client) ListRepositoriesWithTier ¶
func (client *Client) ListRepositoriesWithTier(tier string, variables *PayloadVariables) (*RepositoryConnection, error)
func (*Client) ListServices ¶
func (client *Client) ListServices(variables *PayloadVariables) (ServiceConnection, error)
func (*Client) ListServicesMaturity ¶
func (c *Client) ListServicesMaturity() ([]ServiceMaturity, error)
func (*Client) ListServicesWithFramework ¶
func (client *Client) ListServicesWithFramework(framework string, variables *PayloadVariables) (ServiceConnection, error)
func (*Client) ListServicesWithLanguage ¶
func (client *Client) ListServicesWithLanguage(language string, variables *PayloadVariables) (ServiceConnection, error)
func (*Client) ListServicesWithLifecycle ¶
func (client *Client) ListServicesWithLifecycle(lifecycle string, variables *PayloadVariables) (ServiceConnection, error)
func (*Client) ListServicesWithOwner ¶
func (client *Client) ListServicesWithOwner(owner string, variables *PayloadVariables) (ServiceConnection, error)
func (*Client) ListServicesWithProduct ¶
func (client *Client) ListServicesWithProduct(product string, variables *PayloadVariables) (ServiceConnection, error)
func (*Client) ListServicesWithTag ¶
func (client *Client) ListServicesWithTag(tag TagArgs, variables *PayloadVariables) (ServiceConnection, error)
func (*Client) ListServicesWithTier ¶
func (client *Client) ListServicesWithTier(tier string, variables *PayloadVariables) (ServiceConnection, error)
func (*Client) ListSystems ¶ added in v2023.4.11
func (c *Client) ListSystems(variables *PayloadVariables) (*SystemConnection, error)
func (*Client) ListTeams ¶
func (client *Client) ListTeams(variables *PayloadVariables) (*TeamConnection, error)
func (*Client) ListTeamsWithManager ¶
func (client *Client) ListTeamsWithManager(email string, variables *PayloadVariables) (*TeamConnection, error)
func (*Client) ListTriggerDefinitions ¶
func (client *Client) ListTriggerDefinitions(variables *PayloadVariables) (CustomActionsTriggerDefinitionsConnection, error)
func (*Client) ListUsers ¶
func (client *Client) ListUsers(variables *PayloadVariables) (UserConnection, error)
func (*Client) RemoveContact ¶
func (*Client) RemoveMember ¶
func (*Client) RemoveMembers ¶
func (*Client) RunnerAppendJobLog ¶
func (c *Client) RunnerAppendJobLog(input RunnerAppendJobLogInput) error
func (*Client) RunnerGetPendingJob ¶
func (*Client) RunnerRegister ¶
func (*Client) RunnerReportJobOutcome ¶
func (c *Client) RunnerReportJobOutcome(input RunnerReportJobOutcomeInput) error
func (*Client) RunnerScale ¶
func (c *Client) RunnerScale(runnerId ID, currentReplicaCount, jobConcurrency int) (*RunnerScale, error)
func (*Client) RunnerUnregister ¶
func (*Client) ServiceApiDocSettingsUpdate ¶
func (*Client) UpdateCategory ¶
func (client *Client) UpdateCategory(input CategoryUpdateInput) (*Category, error)
func (*Client) UpdateCheckAlertSourceUsage ¶
func (client *Client) UpdateCheckAlertSourceUsage(input CheckAlertSourceUsageUpdateInput) (*Check, error)
func (*Client) UpdateCheckCustomEvent ¶
func (client *Client) UpdateCheckCustomEvent(input CheckCustomEventUpdateInput) (*Check, error)
func (*Client) UpdateCheckGitBranchProtection ¶
func (client *Client) UpdateCheckGitBranchProtection(input CheckGitBranchProtectionUpdateInput) (*Check, error)
func (*Client) UpdateCheckHasDocumentation ¶
func (client *Client) UpdateCheckHasDocumentation(input CheckHasDocumentationUpdateInput) (*Check, error)
func (*Client) UpdateCheckHasRecentDeploy ¶
func (client *Client) UpdateCheckHasRecentDeploy(input CheckHasRecentDeployUpdateInput) (*Check, error)
func (*Client) UpdateCheckManual ¶
func (client *Client) UpdateCheckManual(input CheckManualUpdateInput) (*Check, error)
func (*Client) UpdateCheckRepositoryFile ¶
func (client *Client) UpdateCheckRepositoryFile(input CheckRepositoryFileUpdateInput) (*Check, error)
func (*Client) UpdateCheckRepositoryGrep ¶
func (client *Client) UpdateCheckRepositoryGrep(input CheckRepositoryGrepUpdateInput) (*Check, error)
func (*Client) UpdateCheckRepositoryIntegrated ¶
func (client *Client) UpdateCheckRepositoryIntegrated(input CheckRepositoryIntegratedUpdateInput) (*Check, error)
func (*Client) UpdateCheckRepositorySearch ¶
func (client *Client) UpdateCheckRepositorySearch(input CheckRepositorySearchUpdateInput) (*Check, error)
func (*Client) UpdateCheckServiceConfiguration ¶
func (client *Client) UpdateCheckServiceConfiguration(input CheckServiceConfigurationUpdateInput) (*Check, error)
func (*Client) UpdateCheckServiceDependency ¶
func (client *Client) UpdateCheckServiceDependency(input CheckServiceDependencyUpdateInput) (*Check, error)
func (*Client) UpdateCheckServiceOwnership ¶
func (client *Client) UpdateCheckServiceOwnership(input CheckServiceOwnershipUpdateInput) (*Check, error)
func (*Client) UpdateCheckServiceProperty ¶
func (client *Client) UpdateCheckServiceProperty(input CheckServicePropertyUpdateInput) (*Check, error)
func (*Client) UpdateCheckTagDefined ¶
func (client *Client) UpdateCheckTagDefined(input CheckTagDefinedUpdateInput) (*Check, error)
func (*Client) UpdateCheckToolUsage ¶
func (client *Client) UpdateCheckToolUsage(input CheckToolUsageUpdateInput) (*Check, error)
func (*Client) UpdateContact ¶
func (client *Client) UpdateContact(id ID, contact ContactInput) (*Contact, error)
func (*Client) UpdateDomain ¶ added in v2023.4.11
func (c *Client) UpdateDomain(identifier string, input DomainInput) (*Domain, error)
func (*Client) UpdateFilter ¶
func (client *Client) UpdateFilter(input FilterUpdateInput) (*Filter, error)
func (*Client) UpdateGroup ¶
func (client *Client) UpdateGroup(identifier string, input GroupInput) (*Group, error)
func (*Client) UpdateLevel ¶
func (client *Client) UpdateLevel(input LevelUpdateInput) (*Level, error)
func (*Client) UpdateService ¶
func (client *Client) UpdateService(input ServiceUpdateInput) (*Service, error)
func (*Client) UpdateServiceRepository ¶
func (client *Client) UpdateServiceRepository(input ServiceRepositoryUpdateInput) (*ServiceRepository, error)
func (*Client) UpdateSystem ¶ added in v2023.4.11
func (c *Client) UpdateSystem(identifier string, input SystemInput) (*System, error)
func (*Client) UpdateTeam ¶
func (client *Client) UpdateTeam(input TeamUpdateInput) (*Team, error)
func (*Client) UpdateTool ¶
func (client *Client) UpdateTool(input ToolUpdateInput) (*Tool, error)
func (*Client) UpdateTriggerDefinition ¶
func (client *Client) UpdateTriggerDefinition(input CustomActionsTriggerDefinitionUpdateInput) (*CustomActionsTriggerDefinition, error)
func (*Client) UpdateUser ¶
func (*Client) UpdateWebhookAction ¶
func (client *Client) UpdateWebhookAction(input CustomActionsWebhookActionUpdateInput) (*CustomActionsExternalAction, error)
type ClientSettings ¶
type ClientSettings struct {
// contains filtered or unexported fields
}
type ConnectiveEnum ¶
type ConnectiveEnum string
ConnectiveEnum represents the logical operator to be used in conjunction with multiple filters (requires filters to be supplied).
const ( ConnectiveEnumAnd ConnectiveEnum = "and" // Used to ensure **all** filters match for a given resource. ConnectiveEnumOr ConnectiveEnum = "or" // Used to ensure **any** filters match for a given resource. )
type ContactCreateInput ¶
type ContactCreateInput struct { Type ContactType `json:"type"` DisplayName string `json:"displayName,omitempty"` Address string `json:"address"` TeamId *ID `json:"teamId,omitempty"` TeamAlias string `json:"teamAlias,omitempty"` }
type ContactDeleteInput ¶
type ContactDeleteInput struct {
Id ID `json:"id"`
}
type ContactInput ¶
type ContactInput struct { Type ContactType `json:"type"` DisplayName string `json:"displayName,omitEmpty"` Address string `json:"address"` }
func CreateContactEmail ¶
func CreateContactEmail(email string, name string) ContactInput
func CreateContactSlack ¶
func CreateContactSlack(channel string, name string) ContactInput
func CreateContactWeb ¶
func CreateContactWeb(address string, name string) ContactInput
type ContactType ¶
type ContactType string
ContactType represents the method of contact.
const ( ContactTypeEmail ContactType = "email" // An email contact method. ContactTypeGitHub ContactType = "github" // ContactTypeSlack ContactType = "slack" // A Slack channel contact method. ContactTypeSlackHandle ContactType = "slack_handle" // A Slack handle contact method. ContactTypeWeb ContactType = "web" // A website contact method. )
type ContactUpdateInput ¶
type ContactUpdateInput struct { Id ID `json:"id"` Type *ContactType `json:"type,omitempty"` DisplayName string `json:"displayName,omitempty"` Address string `json:"address,omitempty"` }
type CustomActionsEntityTypeEnum ¶ added in v2023.3.14
type CustomActionsEntityTypeEnum string
CustomActionsEntityTypeEnum
const ( CustomActionsEntityTypeEnumGlobal CustomActionsEntityTypeEnum = "GLOBAL" // CustomActionsEntityTypeEnumService CustomActionsEntityTypeEnum = "SERVICE" // )
type CustomActionsExternalAction ¶
type CustomActionsExternalAction struct { CustomActionsId Description string `graphql:"description"` LiquidTemplate string `graphql:"liquidTemplate"` Name string `graphql:"name"` CustomActionsWebhookAction `graphql:"... on CustomActionsWebhookAction"` }
type CustomActionsExternalActionsConnection ¶
type CustomActionsExternalActionsConnection struct { Nodes []CustomActionsExternalAction PageInfo PageInfo TotalCount int }
type CustomActionsHttpMethodEnum ¶
type CustomActionsHttpMethodEnum string
CustomActionsHttpMethodEnum An HTTP request method
const ( CustomActionsHttpMethodEnumDelete CustomActionsHttpMethodEnum = "DELETE" // An HTTP DELETE request CustomActionsHttpMethodEnumGet CustomActionsHttpMethodEnum = "GET" // CustomActionsHttpMethodEnumPatch CustomActionsHttpMethodEnum = "PATCH" // CustomActionsHttpMethodEnumPost CustomActionsHttpMethodEnum = "POST" // An HTTP POST request CustomActionsHttpMethodEnumPut CustomActionsHttpMethodEnum = "PUT" // An HTTP PUT request )
type CustomActionsId ¶
type CustomActionsTriggerDefinition ¶
type CustomActionsTriggerDefinition struct { Action CustomActionsId `graphql:"action"` Aliases []string `graphql:"aliases"` Description string `graphql:"description"` Filter FilterId `graphql:"filter"` Id ID `graphql:"id"` ManualInputsDefinition string `graphql:"manualInputsDefinition"` Name string `graphql:"name"` Owner TeamId `graphql:"owner"` Published bool `graphql:"published"` Timestamps Timestamps `graphql:"timestamps"` AccessControl CustomActionsTriggerDefinitionAccessControlEnum `graphql:"accessControl"` ResponseTemplate string `graphql:"responseTemplate"` }
type CustomActionsTriggerDefinitionAccessControlEnum ¶
type CustomActionsTriggerDefinitionAccessControlEnum string
CustomActionsTriggerDefinitionAccessControlEnum Who can see and use the trigger definition
const ( CustomActionsTriggerDefinitionAccessControlEnumAdmins CustomActionsTriggerDefinitionAccessControlEnum = "admins" // Admin users CustomActionsTriggerDefinitionAccessControlEnumEveryone CustomActionsTriggerDefinitionAccessControlEnum = "everyone" // All users of OpsLevel CustomActionsTriggerDefinitionAccessControlEnumServiceOwners CustomActionsTriggerDefinitionAccessControlEnum = "service_owners" // The owners of a service )
type CustomActionsTriggerDefinitionCreateInput ¶
type CustomActionsTriggerDefinitionCreateInput struct { Name string `json:"name"` Description *graphql.String `json:"description,omitempty"` Owner ID `json:"ownerId"` // In the API actionID is `ID!` but that's because of the CustomActionsWebhookActionCreateInput // But we are not implementing that because it is used for the UI, so we need to enforce an actionId is given Action ID `json:"actionId"` Filter *ID `json:"filterId,omitempty"` // This is being explicitly left out to reduce the complexity of the implementation // action *CustomActionsWebhookActionCreateInput ManualInputsDefinition string `json:"manualInputsDefinition"` Published *bool `json:"published,omitempty"` AccessControl CustomActionsTriggerDefinitionAccessControlEnum `json:"accessControl"` ResponseTemplate string `json:"responseTemplate"` }
type CustomActionsTriggerDefinitionUpdateInput ¶
type CustomActionsTriggerDefinitionUpdateInput struct { Id ID `json:"id"` Name *graphql.String `json:"name,omitempty"` Description *graphql.String `json:"description,omitempty"` Owner *ID `json:"ownerId,omitempty"` Action *ID `json:"actionId,omitempty"` Filter *ID `json:"filterId,omitempty"` // This is being explicitly left out to reduce the complexity of the implementation // action *CustomActionsWebhookActionCreateInput ManualInputsDefinition *string `json:"manualInputsDefinition,omitempty"` Published *bool `json:"published,omitempty"` AccessControl CustomActionsTriggerDefinitionAccessControlEnum `json:"accessControl,omitempty"` ResponseTemplate *string `json:"responseTemplate,omitempty"` }
type CustomActionsTriggerDefinitionsConnection ¶
type CustomActionsTriggerDefinitionsConnection struct { Nodes []CustomActionsTriggerDefinition PageInfo PageInfo TotalCount int }
type CustomActionsTriggerEventStatusEnum ¶ added in v2023.3.14
type CustomActionsTriggerEventStatusEnum string
CustomActionsTriggerEventStatusEnum
const ( CustomActionsTriggerEventStatusEnumFailure CustomActionsTriggerEventStatusEnum = "FAILURE" // CustomActionsTriggerEventStatusEnumPending CustomActionsTriggerEventStatusEnum = "PENDING" // CustomActionsTriggerEventStatusEnumSuccess CustomActionsTriggerEventStatusEnum = "SUCCESS" // )
type CustomActionsWebhookAction ¶
type CustomActionsWebhookAction struct { Headers JSON `graphql:"headers" scalar:"true"` HTTPMethod CustomActionsHttpMethodEnum `graphql:"httpMethod"` WebhookURL string `graphql:"webhookUrl"` }
type CustomActionsWebhookActionCreateInput ¶
type CustomActionsWebhookActionCreateInput struct { Name string `json:"name"` Description *graphql.String `json:"description,omitempty"` LiquidTemplate string `json:"liquidTemplate"` WebhookURL string `json:"webhookUrl"` HTTPMethod CustomActionsHttpMethodEnum `json:"httpMethod"` Headers JSON `json:"headers"` }
type CustomActionsWebhookActionUpdateInput ¶
type CustomActionsWebhookActionUpdateInput struct { Id ID `json:"id"` Name *graphql.String `json:"name,omitempty"` Description *graphql.String `json:"description,omitempty"` LiquidTemplate *graphql.String `json:"liquidTemplate,omitempty"` WebhookURL *graphql.String `json:"webhookUrl,omitempty"` HTTPMethod CustomActionsHttpMethodEnum `json:"httpMethod,omitempty"` Headers *JSON `json:"headers,omitempty"` }
type CustomEventCheckFragment ¶
type CustomEventCheckFragment struct { Integration Integration `graphql:"integration"` PassPending bool `graphql:"passPending"` ResultMessage string `graphql:"resultMessage"` ServiceSelector string `graphql:"serviceSelector"` SuccessCondition string `graphql:"successCondition"` }
type DeleteInput ¶
type DeleteInput struct {
Id ID `json:"id"`
}
type DomainConnection ¶ added in v2023.4.11
type DomainId ¶ added in v2023.4.11
type DomainId Identifier
func (*DomainId) AssignSystem ¶ added in v2023.4.11
func (*DomainId) ChildSystems ¶ added in v2023.4.11
func (s *DomainId) ChildSystems(client *Client, variables *PayloadVariables) (*SystemConnection, error)
func (*DomainId) Tags ¶ added in v2023.4.11
func (s *DomainId) Tags(client *Client, variables *PayloadVariables) (*TagConnection, error)
type DomainInput ¶ added in v2023.4.11
type EntityOwner ¶ added in v2023.4.11
type EntityOwner struct { OnGroup GroupId `graphql:"... on Group"` OnTeam TeamId `graphql:"... on Team"` }
func (*EntityOwner) Id ¶ added in v2023.4.11
func (s *EntityOwner) Id() ID
type Filter ¶
type Filter struct { Connective ConnectiveEnum HtmlURL string FilterId Predicates []FilterPredicate }
type FilterConnection ¶
type FilterCreateInput ¶
type FilterCreateInput struct { Name string `json:"name"` Predicates []FilterPredicate `json:"predicates"` Connective ConnectiveEnum `json:"connective,omitempty"` }
type FilterPredicate ¶
type FilterPredicate struct { Key PredicateKeyEnum `json:"key"` KeyData string `json:"keyData,omitempty"` Type PredicateTypeEnum `json:"type"` Value string `json:"value,omitempty"` }
type FilterUpdateInput ¶
type FilterUpdateInput struct { Id ID `json:"id"` Name string `json:"name,omitempty"` Predicates []FilterPredicate `json:"predicates"` //The list of predicates used to select which services apply to the filter. All existing predicates will be replaced by these predicates. Connective ConnectiveEnum `json:"connective,omitempty"` }
type FrequencyTimeScale ¶
type FrequencyTimeScale string
FrequencyTimeScale represents the time scale type for the frequency.
const ( FrequencyTimeScaleDay FrequencyTimeScale = "day" // Consider the time scale of days. FrequencyTimeScaleMonth FrequencyTimeScale = "month" // Consider the time scale of months. FrequencyTimeScaleWeek FrequencyTimeScale = "week" // Consider the time scale of weeks. FrequencyTimeScaleYear FrequencyTimeScale = "year" // Consider the time scale of years. )
type GitBranchProtectionCheckFragment ¶
type GitBranchProtectionCheckFragment struct { }
type Group ¶
type Group struct { GroupId Description string `json:"description,omitempty"` HtmlURL string `json:"htmlUrl,omitempty"` Name string `json:"name,omitempty"` Parent GroupId `json:"parent,omitempty"` }
func (*Group) ChildTeams ¶
func (g *Group) ChildTeams(client *Client, variables *PayloadVariables) (*TeamConnection, error)
func (*Group) DescendantRepositories ¶
func (g *Group) DescendantRepositories(client *Client, variables *PayloadVariables) (*RepositoryConnection, error)
func (*Group) DescendantServices ¶
func (g *Group) DescendantServices(client *Client, variables *PayloadVariables) (*ServiceConnection, error)
func (*Group) DescendantSubgroups ¶
func (g *Group) DescendantSubgroups(client *Client, variables *PayloadVariables) (*GroupConnection, error)
func (*Group) DescendantTeams ¶
func (g *Group) DescendantTeams(client *Client, variables *PayloadVariables) (*TeamConnection, error)
func (*Group) Members ¶
func (g *Group) Members(client *Client, variables *PayloadVariables) (*UserConnection, error)
type GroupConnection ¶
type GroupInput ¶
type GroupInput struct { Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` Parent *IdentifierInput `json:"parent"` Members *[]MemberInput `json:"members,omitempty"` Teams *[]IdentifierInput `json:"teams,omitempty"` }
type HasDocumentationCheckFragment ¶
type HasDocumentationCheckFragment struct { DocumentType HasDocumentationTypeEnum `graphql:"documentType"` DocumentSubtype HasDocumentationSubtypeEnum `graphql:"documentSubtype"` }
type HasDocumentationSubtypeEnum ¶
type HasDocumentationSubtypeEnum string
HasDocumentationSubtypeEnum represents the subtype of the document.
const (
HasDocumentationSubtypeEnumOpenapi HasDocumentationSubtypeEnum = "openapi" // Document is an OpenAPI document.
)
type HasDocumentationTypeEnum ¶
type HasDocumentationTypeEnum string
HasDocumentationTypeEnum represents the type of the document.
const ( HasDocumentationTypeEnumAPI HasDocumentationTypeEnum = "api" // Document is an API document. HasDocumentationTypeEnumTech HasDocumentationTypeEnum = "tech" // )
type HasRecentDeployCheckFragment ¶
type HasRecentDeployCheckFragment struct {
Days int `graphql:"days"`
}
type Identifier ¶ added in v2023.3.14
type IdentifierInput ¶
type IdentifierInput struct { Id ID `graphql:"id" json:"id,omitempty"` Alias string `graphql:"alias" json:"alias,omitempty"` }
func NewIdentifier ¶
func NewIdentifier(value string) *IdentifierInput
func NewIdentifierArray ¶ added in v2023.4.11
func NewIdentifierArray(values []string) []IdentifierInput
type Integration ¶
func (*Integration) Alias ¶
func (self *Integration) Alias() string
type IntegrationConnection ¶
type IntegrationConnection struct { Nodes []Integration PageInfo PageInfo TotalCount int }
type JSON ¶
JSON is a specialized map[string]string to support proper graphql serialization
func (JSON) GetGraphQLType ¶
func (JSON) MarshalJSON ¶
type LevelConnection ¶
func (*LevelConnection) Hydrate ¶
func (conn *LevelConnection) Hydrate(client *Client) error
type LevelCreateInput ¶
type LevelDeleteInput ¶
type LevelDeleteInput struct {
Id ID `json:"id"`
}
type LevelUpdateInput ¶
type LevelUpdateInput struct { Id ID `json:"id"` Name graphql.String `json:"name,omitempty"` Description *graphql.String `json:"description,omitempty"` }
type ManualCheckFragment ¶
type ManualCheckFragment struct { UpdateFrequency *ManualCheckFrequency `graphql:"updateFrequency"` UpdateRequiresComment bool `graphql:"updateRequiresComment"` }
type ManualCheckFrequency ¶
type ManualCheckFrequency struct { StartingDate iso8601.Time `graphql:"startingDate"` FrequencyTimeScale FrequencyTimeScale `graphql:"frequencyTimeScale"` FrequencyValue int `graphql:"frequencyValue"` }
type ManualCheckFrequencyInput ¶
type ManualCheckFrequencyInput struct { StartingDate iso8601.Time `json:"startingDate"` FrequencyTimeScale FrequencyTimeScale `json:"frequencyTimeScale"` FrequencyValue int `json:"frequencyValue"` }
func NewManualCheckFrequencyInput ¶
func NewManualCheckFrequencyInput(startingDate string, timeScale FrequencyTimeScale, value int) *ManualCheckFrequencyInput
type MaturityReport ¶
type MaturityReport struct { CategoryBreakdown []CategoryBreakdown OverallLevel Level }
func (*MaturityReport) Get ¶
func (s *MaturityReport) Get(category string) *Level
Get Given a 'category' name returns the 'Level'
type MemberInput ¶
type MemberInput struct {
Email string `json:"email"`
}
type OpsLevelErrors ¶
type Option ¶
type Option func(*ClientSettings)
func SetAPIToken ¶
func SetAPIVisibility ¶
func SetHeaders ¶ added in v2023.3.14
func SetMaxRetries ¶
func SetPageSize ¶
func SetTimeout ¶
func SetUserAgentExtra ¶
type PageInfo ¶
type PageInfo struct { HasNextPage graphql.Boolean `graphql:"hasNextPage"` HasPreviousPage graphql.Boolean `graphql:"hasPreviousPage"` Start graphql.String `graphql:"startCursor"` End graphql.String `graphql:"endCursor"` }
type PayloadSortEnum ¶ added in v2023.3.14
type PayloadSortEnum string
PayloadSortEnum
const ( PayloadSortEnumCreatedAtAsc PayloadSortEnum = "created_at_ASC" // PayloadSortEnumCreatedAtDesc PayloadSortEnum = "created_at_DESC" // PayloadSortEnumProcessedAtAsc PayloadSortEnum = "processed_at_ASC" // PayloadSortEnumProcessedAtDesc PayloadSortEnum = "processed_at_DESC" // )
type PayloadVariables ¶
type PayloadVariables map[string]interface{}
type Predicate ¶
type Predicate struct { Type PredicateTypeEnum `graphql:"type"` Value string `graphql:"value"` }
type PredicateInput ¶
type PredicateInput struct { Type PredicateTypeEnum `json:"type"` Value string `json:"value,omitempty"` }
type PredicateKeyEnum ¶
type PredicateKeyEnum string
PredicateKeyEnum represents fields that can be used as part of filter for services.
const ( PredicateKeyEnumCreationSource PredicateKeyEnum = "creation_source" // Filter by the creation source. PredicateKeyEnumFramework PredicateKeyEnum = "framework" // Filter by `framework` field. PredicateKeyEnumGroupIDs PredicateKeyEnum = "group_ids" // Filter by group hierarchy. Will return resources who's owner is in the group ancestry chain. PredicateKeyEnumLanguage PredicateKeyEnum = "language" // Filter by `language` field. PredicateKeyEnumLifecycleIndex PredicateKeyEnum = "lifecycle_index" // Filter by `lifecycle` field. PredicateKeyEnumName PredicateKeyEnum = "name" // Filter by `name` field. PredicateKeyEnumOwnerID PredicateKeyEnum = "owner_id" // Filter by `owner` field. PredicateKeyEnumProduct PredicateKeyEnum = "product" // Filter by `product` field. PredicateKeyEnumTags PredicateKeyEnum = "tags" // Filter by `tags` field. PredicateKeyEnumTierIndex PredicateKeyEnum = "tier_index" // Filter by `tier` field. PredicateKeyEnumDomainID PredicateKeyEnum = "domain_id" // Filter by Domain that includes the System this service is assigned to, if any. PredicateKeyEnumSystemID PredicateKeyEnum = "system_id" // Filter by System that this service is assigned to, if any. )
type PredicateTypeEnum ¶
type PredicateTypeEnum string
PredicateTypeEnum represents operations that can be used on predicates.
const ( PredicateTypeEnumBelongsTo PredicateTypeEnum = "belongs_to" // Belongs to a group's hierarchy. PredicateTypeEnumContains PredicateTypeEnum = "contains" // Contains a specific value. PredicateTypeEnumDoesNotContain PredicateTypeEnum = "does_not_contain" // Does not contain a specific value. PredicateTypeEnumDoesNotEqual PredicateTypeEnum = "does_not_equal" // Does not equal a specific value. PredicateTypeEnumDoesNotExist PredicateTypeEnum = "does_not_exist" // Specific attribute does not exist. PredicateTypeEnumEndsWith PredicateTypeEnum = "ends_with" // Ends with a specific value. PredicateTypeEnumEquals PredicateTypeEnum = "equals" // Equals a specific value. PredicateTypeEnumExists PredicateTypeEnum = "exists" // Specific attribute exists. PredicateTypeEnumGreaterThanOrEqualTo PredicateTypeEnum = "greater_than_or_equal_to" // Greater than or equal to a specific value (numeric only). PredicateTypeEnumLessThanOrEqualTo PredicateTypeEnum = "less_than_or_equal_to" // Less than or equal to a specific value (numeric only). PredicateTypeEnumMatchesRegex PredicateTypeEnum = "matches_regex" // Matches a value using a regular expression. PredicateTypeEnumSatisfiesJqExpression PredicateTypeEnum = "satisfies_jq_expression" // Satisfies an expression defined in jq. PredicateTypeEnumSatisfiesVersionConstraint PredicateTypeEnum = "satisfies_version_constraint" // Satisfies version constraint (tag value only). PredicateTypeEnumStartsWith PredicateTypeEnum = "starts_with" // Starts with a specific value. )
type PredicateUpdateInput ¶
type PredicateUpdateInput struct { Type PredicateTypeEnum `json:"type,omitempty"` Value string `json:"value,omitempty"` }
type Repository ¶
type Repository struct { ArchivedAt iso8601.Time CreatedOn iso8601.Time DefaultAlias string DefaultBranch string Description string Forked bool HtmlUrl string Id ID Languages []Language LastOwnerChangedAt iso8601.Time Name string Organization string Owner TeamId Private bool RepoKey string Services *RepositoryServiceConnection Tags *RepositoryTagConnection Tier Tier Type string Url string Visible bool }
func (*Repository) GetService ¶
func (r *Repository) GetService(service ID, directory string) *ServiceRepository
func (*Repository) GetServices ¶ added in v2023.3.14
func (r *Repository) GetServices(client *Client, variables *PayloadVariables) (*RepositoryServiceConnection, error)
func (*Repository) GetTags ¶ added in v2023.3.14
func (r *Repository) GetTags(client *Client, variables *PayloadVariables) (*RepositoryTagConnection, error)
func (*Repository) Hydrate ¶
func (r *Repository) Hydrate(client *Client) error
type RepositoryConnection ¶
type RepositoryId ¶
Lightweight Repository struct used to make some API calls return less data
type RepositoryPath ¶
type RepositoryServiceConnection ¶
type RepositoryServiceConnection struct { Edges []RepositoryServiceEdge PageInfo PageInfo TotalCount int }
type RepositoryServiceEdge ¶
type RepositoryServiceEdge struct { AtRoot bool Node ServiceId Paths []RepositoryPath ServiceRepositories []ServiceRepository }
type RepositoryTagConnection ¶
type RepositoryVisibilityEnum ¶ added in v2023.3.14
type RepositoryVisibilityEnum string
RepositoryVisibilityEnum
const ( RepositoryVisibilityEnumInternal RepositoryVisibilityEnum = "INTERNAL" // RepositoryVisibilityEnumPrivate RepositoryVisibilityEnum = "PRIVATE" // RepositoryVisibilityEnumPublic RepositoryVisibilityEnum = "PUBLIC" // )
type ResourceDocumentStatusTypeEnum ¶ added in v2023.3.14
type ResourceDocumentStatusTypeEnum string
ResourceDocumentStatusTypeEnum
const ( ResourceDocumentStatusTypeEnumHidden ResourceDocumentStatusTypeEnum = "hidden" // ResourceDocumentStatusTypeEnumPinned ResourceDocumentStatusTypeEnum = "pinned" // ResourceDocumentStatusTypeEnumVisible ResourceDocumentStatusTypeEnum = "visible" // )
type RestResponse ¶
type Runner ¶
type Runner struct { Id ID `json:"id"` Status RunnerStatusTypeEnum `json:"status"` }
type RunnerAppendJobLogInput ¶
type RunnerJob ¶
type RunnerJob struct { Commands []string `json:"commands"` Id ID `json:"id"` Image string `json:"image"` Outcome RunnerJobOutcomeEnum `json:"outcome"` Status RunnerJobStatusEnum `json:"status"` Variables []RunnerJobVariable `json:"variables"` Files []RunnerJobFile `json:"files"` }
type RunnerJobFile ¶
type RunnerJobOutcomeEnum ¶
type RunnerJobOutcomeEnum string
RunnerJobOutcomeEnum represents the runner job outcome.
const ( RunnerJobOutcomeEnumUnstarted RunnerJobOutcomeEnum = "unstarted" // translation missing: en.graphql.types.runner_job_outcome_enum.unstarted. RunnerJobOutcomeEnumCanceled RunnerJobOutcomeEnum = "canceled" // Job was canceled. RunnerJobOutcomeEnumFailed RunnerJobOutcomeEnum = "failed" // Job failed during execution. RunnerJobOutcomeEnumSuccess RunnerJobOutcomeEnum = "success" // Job succeded the execution. RunnerJobOutcomeEnumQueueTimeout RunnerJobOutcomeEnum = "queue_timeout" // Job was not assigned to a runner for too long. RunnerJobOutcomeEnumExecutionTimeout RunnerJobOutcomeEnum = "execution_timeout" // Job run took too long to complete, and was marked as failed. RunnerJobOutcomeEnumPodTimeout RunnerJobOutcomeEnum = "pod_timeout" // A pod could not be scheduled for the job in time. )
type RunnerJobStatusEnum ¶
type RunnerJobStatusEnum string
RunnerJobStatusEnum represents the runner job status.
const ( RunnerJobStatusEnumCreated RunnerJobStatusEnum = "created" // A created runner job, but not yet ready to be run. RunnerJobStatusEnumPending RunnerJobStatusEnum = "pending" // A runner job ready to be run. RunnerJobStatusEnumRunning RunnerJobStatusEnum = "running" // A runner job being run by a runner. RunnerJobStatusEnumComplete RunnerJobStatusEnum = "complete" // A finished runner job. )
const ( RunnerStatusTypeEnumInactive RunnerJobStatusEnum = "inactive" // The runner will not actively take jobs. RunnerStatusTypeEnumRegistered RunnerJobStatusEnum = "registered" // The runner will process jobs. )
type RunnerJobVariable ¶
type RunnerReportJobOutcomeInput ¶
type RunnerReportJobOutcomeInput struct { RunnerId ID `json:"runnerId"` RunnerJobId ID `json:"runnerJobId"` Outcome RunnerJobOutcomeEnum `json:"outcome"` OutcomeVariables []RunnerJobOutcomeVariable `json:"outcomeVariables,omitempty"` }
type RunnerScale ¶
type RunnerScale struct {
RecommendedReplicaCount int `json:"recommendedReplicaCount"`
}
type RunnerStatusTypeEnum ¶
type RunnerStatusTypeEnum string
RunnerStatusTypeEnum represents The status of an OpsLevel runner.
type Service ¶
type Service struct { ApiDocumentPath string `json:"apiDocumentPath,omitempty"` Description string `json:"description,omitempty"` Framework string `json:"framework,omitempty"` HtmlURL string `json:"htmlUrl"` ServiceId Language string `json:"language,omitempty"` Lifecycle Lifecycle `json:"lifecycle,omitempty"` Name string `json:"name,omitempty"` Owner TeamId `json:"owner,omitempty"` PreferredApiDocument *ServiceDocument `json:"preferredApiDocument,omitempty"` PreferredApiDocumentSource *ApiDocumentSourceEnum `json:"preferredApiDocumentSource,omitempty"` Product string `json:"product,omitempty"` Repositories *ServiceRepositoryConnection `json:"repos,omitempty" graphql:"repos"` Tags *TagConnection `json:"tags,omitempty"` Tier Tier `json:"tier,omitempty"` Timestamps Timestamps `json:"timestamps"` Tools *ToolConnection `json:"tools,omitempty"` }
func (*Service) Documents ¶
func (s *Service) Documents(client *Client) ([]ServiceDocument, error)
Deprecated use GetDocuments(client) instead
func (*Service) GetDocuments ¶ added in v2023.3.14
func (s *Service) GetDocuments(client *Client, variables *PayloadVariables) (*ServiceDocumentsConnection, error)
func (*Service) GetRepositories ¶ added in v2023.3.14
func (s *Service) GetRepositories(client *Client, variables *PayloadVariables) (*ServiceRepositoryConnection, error)
func (*Service) GetTags ¶ added in v2023.3.14
func (s *Service) GetTags(client *Client, variables *PayloadVariables) (*TagConnection, error)
func (*Service) GetTools ¶ added in v2023.3.14
func (s *Service) GetTools(client *Client, variables *PayloadVariables) (*ToolConnection, error)
type ServiceConnection ¶
type ServiceCreateInput ¶
type ServiceCreateInput struct { Name string `json:"name"` Product string `json:"product,omitempty"` Description string `json:"description,omitempty"` Language string `json:"language,omitempty"` Framework string `json:"framework,omitempty"` Tier string `json:"tierAlias,omitempty"` Owner string `json:"ownerAlias,omitempty"` Lifecycle string `json:"lifecycleAlias,omitempty"` }
type ServiceDeleteInput ¶
type ServiceDocument ¶
type ServiceDocument struct { Id ID `graphql:"id" json:"id"` HtmlURL string `graphql:"htmlUrl" json:"htmUrl,omitempty"` Source ServiceDocumentSource `graphql:"source" json:"source"` Timestamps Timestamps `graphql:"timestamps" json:"timestamps"` }
type ServiceDocumentContent ¶
type ServiceDocumentContent struct { ServiceDocument Content string `graphql:"content" json:"content,omitempty"` }
type ServiceDocumentSource ¶
type ServiceDocumentSource struct { Integration `graphql:"... on ApiDocIntegration"` ServiceRepository `graphql:"... on ServiceRepository"` }
type ServiceDocumentsConnection ¶ added in v2023.3.14
type ServiceDocumentsConnection struct { Nodes []ServiceDocument PageInfo PageInfo TotalCount int }
type ServiceMaturity ¶
type ServiceMaturity struct { Name string MaturityReport MaturityReport }
type ServiceOwnershipCheckContactType ¶
type ServiceOwnershipCheckContactType string
TODO: This appears to be duplicative of the above and i'm not sure why we need it ContactType represents the method of contact.
const ( ServiceOwnershipCheckContactTypeAny ServiceOwnershipCheckContactType = "any" // Any contact method. ServiceOwnershipCheckContactTypeSlack ServiceOwnershipCheckContactType = "slack" // A Slack channel contact method. ServiceOwnershipCheckContactTypeSlackHandle ServiceOwnershipCheckContactType = "slack_handle" // A Slack handle contact method. ServiceOwnershipCheckContactTypeEmail ServiceOwnershipCheckContactType = "email" // An email contact method. ServiceOwnershipCheckContactTypeWeb ServiceOwnershipCheckContactType = "web" // A website contact method. )
type ServiceOwnershipCheckFragment ¶
type ServiceOwnershipCheckFragment struct { RequireContactMethod *bool `graphql:"requireContactMethod"` ContactMethod *ServiceOwnershipCheckContactType `graphql:"contactMethod"` TeamTagKey string `graphql:"tagKey"` TeamTagPredicate *Predicate `graphql:"tagPredicate"` }
type ServicePropertyCheckFragment ¶
type ServicePropertyCheckFragment struct { Property ServicePropertyTypeEnum `graphql:"serviceProperty"` Predicate *Predicate `graphql:"propertyValuePredicate"` }
type ServicePropertyTypeEnum ¶
type ServicePropertyTypeEnum string
ServicePropertyTypeEnum represents properties of services that can be validated.
const ( ServicePropertyTypeEnumDescription ServicePropertyTypeEnum = "description" // The description of a service. ServicePropertyTypeEnumFramework ServicePropertyTypeEnum = "framework" // The primary software development framework of a service. ServicePropertyTypeEnumLanguage ServicePropertyTypeEnum = "language" // The primary programming language of a service. ServicePropertyTypeEnumLifecycleIndex ServicePropertyTypeEnum = "lifecycle_index" // The index of the lifecycle a service belongs to. ServicePropertyTypeEnumName ServicePropertyTypeEnum = "name" // The name of a service. ServicePropertyTypeEnumNote ServicePropertyTypeEnum = "note" // ServicePropertyTypeEnumProduct ServicePropertyTypeEnum = "product" // The product that is associated with a service. ServicePropertyTypeEnumTierIndex ServicePropertyTypeEnum = "tier_index" // The index of the tier a service belongs to. )
type ServiceRepository ¶
type ServiceRepository struct { BaseDirectory string DisplayName string Id ID Repository RepositoryId Service ServiceId }
type ServiceRepositoryConnection ¶
type ServiceRepositoryConnection struct { Edges []ServiceRepositoryEdge PageInfo PageInfo TotalCount int }
type ServiceRepositoryCreateInput ¶
type ServiceRepositoryCreateInput struct { Service IdentifierInput `json:"service"` Repository IdentifierInput `json:"repository"` BaseDirectory string `json:"baseDirectory"` DisplayName string `json:"displayName,omitempty"` }
type ServiceRepositoryEdge ¶
type ServiceRepositoryEdge struct { Node RepositoryId ServiceRepositories []ServiceRepository }
type ServiceSortEnum ¶ added in v2023.3.14
type ServiceSortEnum string
ServiceSortEnum
const ( ServiceSortEnumAlertStatusAsc ServiceSortEnum = "alert_status_ASC" // ServiceSortEnumAlertStatusDesc ServiceSortEnum = "alert_status_DESC" // ServiceSortEnumChecksPassingAsc ServiceSortEnum = "checks_passing_ASC" // ServiceSortEnumChecksPassingDesc ServiceSortEnum = "checks_passing_DESC" // ServiceSortEnumLastDeployAsc ServiceSortEnum = "last_deploy_ASC" // ServiceSortEnumLastDeployDesc ServiceSortEnum = "last_deploy_DESC" // ServiceSortEnumLevelIndexAsc ServiceSortEnum = "level_index_ASC" // ServiceSortEnumLevelIndexDesc ServiceSortEnum = "level_index_DESC" // ServiceSortEnumLifecycleAsc ServiceSortEnum = "lifecycle_ASC" // ServiceSortEnumLifecycleDesc ServiceSortEnum = "lifecycle_DESC" // ServiceSortEnumNameAsc ServiceSortEnum = "name_ASC" // ServiceSortEnumNameDesc ServiceSortEnum = "name_DESC" // ServiceSortEnumOwnerAsc ServiceSortEnum = "owner_ASC" // ServiceSortEnumOwnerDesc ServiceSortEnum = "owner_DESC" // ServiceSortEnumProductAsc ServiceSortEnum = "product_ASC" // ServiceSortEnumProductDesc ServiceSortEnum = "product_DESC" // ServiceSortEnumServiceStatAsc ServiceSortEnum = "service_stat_ASC" // ServiceSortEnumServiceStatDesc ServiceSortEnum = "service_stat_DESC" // ServiceSortEnumTierAsc ServiceSortEnum = "tier_ASC" // ServiceSortEnumTierDesc ServiceSortEnum = "tier_DESC" // )
type ServiceUpdateInput ¶
type ServiceUpdateInput struct { Id ID `json:"id,omitempty"` Alias string `json:"alias,omitempty"` Name string `json:"name,omitempty"` Product string `json:"product,omitempty"` Description string `json:"description,omitempty"` Language string `json:"language,omitempty"` Framework string `json:"framework,omitempty"` Tier string `json:"tierAlias,omitempty"` Owner string `json:"ownerAlias,omitempty"` Lifecycle string `json:"lifecycleAlias,omitempty"` }
type SystemConnection ¶ added in v2023.4.11
type SystemId ¶ added in v2023.4.11
type SystemId Identifier
func (*SystemId) AssignService ¶ added in v2023.4.11
func (*SystemId) ChildServices ¶ added in v2023.4.11
func (s *SystemId) ChildServices(client *Client, variables *PayloadVariables) (*ServiceConnection, error)
func (*SystemId) Tags ¶ added in v2023.4.11
func (s *SystemId) Tags(client *Client, variables *PayloadVariables) (*TagConnection, error)
type SystemInput ¶ added in v2023.4.11
type SystemInput struct { Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` Owner *ID `json:"ownerId,omitempty"` Parent *IdentifierInput `json:"parent,omitempty"` Note string `json:"note,omitempty"` }
type TagArgs ¶
func NewTagArgs ¶
type TagAssignInput ¶
type TagAssignInput struct { Id ID `json:"id,omitempty"` Alias string `json:"alias,omitempty"` Type TaggableResource `json:"type,omitempty"` Tags []TagInput `json:"tags"` }
type TagConnection ¶
type TagCreateInput ¶
type TagCreateInput struct { Id ID `json:"id"` Alias string `json:"alias,omitempty"` Type TaggableResource `json:"type,omitempty"` Key string `json:"key"` Value string `json:"value"` }
type TagDefinedCheckFragment ¶
type TagDeleteInput ¶
type TagDeleteInput struct {
Id ID `json:"id"`
}
type TagUpdateInput ¶
type TaggableResource ¶
type TaggableResource string
TaggableResource represents possible types to apply tags to.
const ( TaggableResourceRepository TaggableResource = "Repository" // Used to identify a Repository. TaggableResourceService TaggableResource = "Service" // Used to identify a Service. TaggableResourceTeam TaggableResource = "Team" // Used to identify a Team. )
type Team ¶
type Team struct { TeamId Aliases []string Contacts []Contact Group GroupId HTMLUrl string Manager User Members *UserConnection Name string Responsibilities string Tags *TagConnection }
func (*Team) GetMembers ¶ added in v2023.3.14
func (t *Team) GetMembers(client *Client, variables *PayloadVariables) (*UserConnection, error)
func (*Team) GetTags ¶ added in v2023.3.14
func (t *Team) GetTags(client *Client, variables *PayloadVariables) (*TagConnection, error)
type TeamConnection ¶
type TeamCreateInput ¶
type TeamCreateInput struct { Name string `json:"name"` ManagerEmail string `json:"managerEmail,omitempty"` Responsibilities string `json:"responsibilities,omitempty"` Group *IdentifierInput `json:"group"` Contacts []ContactInput `json:"contacts,omitempty"` }
type TeamDeleteInput ¶
type TeamIdConnection ¶ added in v2023.3.14
Had to create this to prevent circular references on User because Team has UserConnection
type TeamMembershipCreateInput ¶
type TeamMembershipCreateInput struct { TeamId ID `json:"teamId"` Members []TeamMembershipUserInput `json:"members"` }
type TeamMembershipDeleteInput ¶
type TeamMembershipDeleteInput struct { TeamId ID `json:"teamId"` Members []TeamMembershipUserInput `json:"members"` }
type TeamMembershipUserInput ¶
type TeamMembershipUserInput struct {
Email string `json:"email"`
}
func BuildMembershipInput ¶
func BuildMembershipInput(members []string) (output []TeamMembershipUserInput)
type TeamUpdateInput ¶
type Timestamps ¶
type ToolCategory ¶
type ToolCategory string
ToolCategory represents the specific categories that a tool can belong to.
const ( ToolCategoryAdmin ToolCategory = "admin" // Tools used for administrative purposes. ToolCategoryAPIDocumentation ToolCategory = "api_documentation" // Tools used as API documentation for this service. ToolCategoryBacklog ToolCategory = "backlog" // ToolCategoryCode ToolCategory = "code" // Tools used for source code. ToolCategoryContinuousIntegration ToolCategory = "continuous_integration" // Tools used for building/unit testing a service. ToolCategoryDeployment ToolCategory = "deployment" // Tools used for deploying changes to a service. ToolCategoryErrors ToolCategory = "errors" // Tools used for tracking/reporting errors. ToolCategoryFeatureFlag ToolCategory = "feature_flag" // Tools used for managing feature flags. ToolCategoryHealthChecks ToolCategory = "health_checks" // Tools used for tracking/reporting the health of a service. ToolCategoryIncidents ToolCategory = "incidents" // Tools used to surface incidents on a service. ToolCategoryIssueTracking ToolCategory = "issue_tracking" // Tools used for tracking issues. ToolCategoryLogs ToolCategory = "logs" // Tools used for displaying logs from services. ToolCategoryMetrics ToolCategory = "metrics" // Tools used for tracking/reporting service metrics. ToolCategoryOrchestrator ToolCategory = "orchestrator" // Tools used for orchestrating a service. ToolCategoryOther ToolCategory = "other" // Tools that do not fit into the available categories. ToolCategoryResiliency ToolCategory = "resiliency" // Tools used for testing the resiliency of a service. ToolCategoryRunbooks ToolCategory = "runbooks" // Tools used for managing runbooks for a service. ToolCategorySecurityScans ToolCategory = "security_scans" // Tools used for performing security scans. ToolCategoryStatusPage ToolCategory = "status_page" // Tools used for reporting the status of a service. ToolCategoryWiki ToolCategory = "wiki" // Tools used as a wiki for this service. )
type ToolConnection ¶
type ToolCreateInput ¶
type ToolDeleteInput ¶
type ToolDeleteInput struct {
Id ID `json:"id"`
}
type ToolUpdateInput ¶
type ToolUpdateInput struct { Id ID `json:"id"` Category ToolCategory `json:"category,omitempty"` DisplayName string `json:"displayName,omitempty"` Url string `json:"url,omitempty"` Environment string `json:"environment,omitempty"` }
type ToolUsageCheckFragment ¶
type ToolUsageCheckFragment struct { ToolCategory ToolCategory `graphql:"toolCategory"` ToolNamePredicate *Predicate `graphql:"toolNamePredicate"` ToolUrlPredicate *Predicate `graphql:"toolUrlPredicate"` EnvironmentPredicate *Predicate `graphql:"environmentPredicate"` }
type User ¶
func (*User) Teams ¶
func (u *User) Teams(client *Client, variables *PayloadVariables) (*TeamIdConnection, error)
type UserConnection ¶
type UserIdentifierInput ¶
type UserIdentifierInput struct { Id ID `graphql:"id" json:"id,omitempty"` Email string `graphql:"email" json:"email,omitempty"` }
func NewUserIdentifier ¶
func NewUserIdentifier(value string) UserIdentifierInput
Source Files
¶
- actions.go
- alert_source.go
- aliases.go
- cache.go
- category.go
- check.go
- client.go
- clientGQL.go
- clientRest.go
- common.go
- doc.go
- document.go
- domain.go
- enum.go
- filters.go
- group.go
- integration.go
- job.go
- json.go
- level.go
- lifecycle.go
- maturity.go
- owner.go
- repository.go
- scalar.go
- service.go
- system.go
- tags.go
- team.go
- tier.go
- tools.go
- user.go
- version.go
Directories
¶
Path | Synopsis |
---|---|
Wrapping the client can be useful when you want to override default behavior, such as always setting context or disallowing (to the best of Go's ability) access to specific receiver functions on `opslevel.Client`.
|
Wrapping the client can be useful when you want to override default behavior, such as always setting context or disallowing (to the best of Go's ability) access to specific receiver functions on `opslevel.Client`. |