Documentation
¶
Overview ¶
Package opslevel provides an OpsLevel API client implementation.
see README for more details.
Index ¶
- Variables
- func AllAlertSourceTypeEnum() []string
- func AllAliasOwnerTypeEnum() []string
- func AllCheckStatus() []string
- func AllCheckType() []string
- func AllConnectiveEnum() []string
- func AllContactType() []string
- func AllFrequencyTimeScale() []string
- func AllPredicateKeyEnum() []string
- func AllPredicateTypeEnum() []string
- func AllServicePropertyTypeEnum() []string
- func AllTaggableResource() []string
- func AllToolCategory() []string
- func AllUserRole() []string
- func Bool(v bool) *bool
- func FormatErrors(errs []OpsLevelErrors) error
- func IsID(value string) bool
- func NewID(id string) *graphql.ID
- func NewISO8601Date(datetime string) iso8601.Time
- func NewInt(i int) *int
- func NewRestClient(options ...Option) *resty.Client
- type AlertSourceTypeEnum
- type AlertSourceUsageCheckFragment
- type AliasCreateInput
- type AliasDeleteInput
- type AliasOwnerTypeEnum
- 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 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 CheckHasRecentDeployCreateInput
- type CheckHasRecentDeployUpdateInput
- type CheckManualCreateInput
- type CheckManualUpdateInput
- type CheckOwner
- type CheckRepositoryFileCreateInput
- type CheckRepositoryFileUpdateInput
- type CheckRepositoryIntegratedCreateInput
- type CheckRepositoryIntegratedUpdateInput
- type CheckRepositorySearchCreateInput
- type CheckRepositorySearchUpdateInput
- type CheckResponsePayload
- type CheckServiceConfigurationCreateInput
- type CheckServiceConfigurationUpdateInput
- 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) AssignTagForAlias(alias string, key string, value string) ([]Tag, error)
- func (client *Client) AssignTagForId(id graphql.ID, key string, value string) ([]Tag, error)
- func (client *Client) AssignTags(input TagAssignInput) ([]Tag, error)
- func (client *Client) AssignTagsForAlias(alias string, tags map[string]string) ([]Tag, error)
- func (client *Client) AssignTagsForId(id graphql.ID, tags map[string]string) ([]Tag, error)
- func (client *Client) ConnectServiceRepository(service *ServiceId, repository *Repository) (*ServiceRepository, error)
- func (client *Client) CreateAlias(input AliasCreateInput) ([]string, error)
- func (client *Client) CreateAliases(ownerId graphql.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) CreateCheckHasRecentDeploy(input CheckHasRecentDeployCreateInput) (*Check, error)
- func (client *Client) CreateCheckManual(input CheckManualCreateInput) (*Check, error)
- func (client *Client) CreateCheckRepositoryFile(input CheckRepositoryFileCreateInput) (*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) 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 (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 (client *Client) CreateTag(input TagCreateInput) (*Tag, error)
- func (client *Client) CreateTags(alias string, tags map[string]string) ([]Tag, error)
- func (client *Client) CreateTagsForId(id graphql.ID, tags map[string]string) ([]Tag, error)
- func (client *Client) CreateTeam(input TeamCreateInput) (*Team, error)
- func (client *Client) CreateTool(input ToolCreateInput) (*Tool, error)
- func (client *Client) DeleteAlias(input AliasDeleteInput) error
- func (client *Client) DeleteCategory(id graphql.ID) error
- func (client *Client) DeleteCheck(id graphql.ID) error
- func (client *Client) DeleteFilter(id graphql.ID) error
- func (client *Client) DeleteGroup(id graphql.ID) error
- func (client *Client) DeleteGroupWithAlias(alias string) error
- func (client *Client) DeleteLevel(id graphql.ID) error
- func (client *Client) DeleteService(input ServiceDeleteInput) error
- func (client *Client) DeleteServiceAlias(alias string) error
- func (client *Client) DeleteServiceRepository(id graphql.ID) error
- func (client *Client) DeleteServiceWithAlias(alias string) error
- func (client *Client) DeleteTag(id graphql.ID) error
- func (client *Client) DeleteTeam(id graphql.ID) error
- func (client *Client) DeleteTeamAlias(alias string) error
- func (client *Client) DeleteTeamWithAlias(alias string) error
- func (client *Client) DeleteTeamWithId(id graphql.ID) errordeprecated
- func (client *Client) DeleteTool(id graphql.ID) error
- func (client *Client) DeleteUser(user string) error
- func (client *Client) GetCategory(id graphql.ID) (*Category, error)
- func (client *Client) GetCheck(id graphql.ID) (*Check, error)
- func (client *Client) GetFilter(id graphql.ID) (*Filter, error)
- func (client *Client) GetGroup(id graphql.ID) (*Group, error)
- func (client *Client) GetGroupWithAlias(alias string) (*Group, error)
- func (client *Client) GetIntegration(id graphql.ID) (*Integration, error)
- func (client *Client) GetLevel(id graphql.ID) (*Level, error)
- func (client *Client) GetRepository(id graphql.ID) (*Repository, error)
- func (client *Client) GetRepositoryWithAlias(alias string) (*Repository, error)
- func (client *Client) GetService(id graphql.ID) (*Service, error)
- func (client *Client) GetServiceCount() (int, error)
- func (client *Client) GetServiceIdWithAlias(alias string) (*ServiceId, error)
- func (client *Client) GetServiceWithAlias(alias string) (*Service, error)
- func (client *Client) GetServiceWithId(id graphql.ID) (*Service, error)deprecated
- func (client *Client) GetTagCount(service graphql.ID) (int, error)
- func (client *Client) GetTagsForService(service graphql.ID) ([]Tag, error)
- func (client *Client) GetTagsForServiceWithAlias(alias string) ([]Tag, error)
- func (client *Client) GetTagsForServiceWithId(service graphql.ID) ([]Tag, error)deprecated
- func (client *Client) GetTeam(id graphql.ID) (*Team, error)
- func (client *Client) GetTeamCount() (int, error)
- func (client *Client) GetTeamWithAlias(alias string) (*Team, error)
- func (client *Client) GetTeamWithId(id graphql.ID) (*Team, error)deprecated
- func (client *Client) GetToolCount(service graphql.ID) (int, error)
- func (client *Client) GetToolsForService(service graphql.ID) ([]Tool, error)
- func (client *Client) GetToolsForServiceWithAlias(alias string) ([]Tool, error)
- func (client *Client) GetToolsForServiceWithId(service graphql.ID) ([]Tool, error)deprecated
- func (client *Client) GetUser(id graphql.ID) (*User, error)
- func (client *Client) InitialPageVariables() PayloadVariables
- func (client *Client) InviteUser(email string, input UserInput) (*User, error)
- func (client *Client) ListCategories() ([]Category, error)
- func (client *Client) ListChecks() ([]Check, error)
- func (client *Client) ListFilters() ([]Filter, error)
- func (client *Client) ListGroups() ([]Group, error)
- func (client *Client) ListIntegrations() ([]Integration, error)
- func (client *Client) ListLevels() ([]Level, error)
- func (client *Client) ListLifecycles() ([]Lifecycle, error)
- func (client *Client) ListRepositories() ([]Repository, error)
- func (client *Client) ListRepositoriesWithTier(tier string) ([]Repository, error)
- func (client *Client) ListServices() ([]Service, error)
- func (c *Client) ListServicesMaturity() ([]ServiceMaturity, error)
- func (client *Client) ListServicesWithFramework(framework string) ([]Service, error)
- func (client *Client) ListServicesWithLanguage(language string) ([]Service, error)
- func (client *Client) ListServicesWithLifecycle(lifecycle string) ([]Service, error)
- func (client *Client) ListServicesWithOwner(owner string) ([]Service, error)
- func (client *Client) ListServicesWithProduct(product string) ([]Service, error)
- func (client *Client) ListServicesWithTag(tag TagArgs) ([]Service, error)
- func (client *Client) ListServicesWithTier(tier string) ([]Service, error)
- func (client *Client) ListTeams() ([]Team, error)
- func (client *Client) ListTeamsWithManager(email string) ([]Team, error)
- func (client *Client) ListTiers() ([]Tier, error)
- func (client *Client) ListUsers() ([]User, error)
- func (client *Client) Mutate(m interface{}, variables map[string]interface{}) 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{}) error
- func (client *Client) QueryCTX(ctx context.Context, q interface{}, variables map[string]interface{}) error
- func (client *Client) RemoveContact(contact graphql.ID) error
- func (client *Client) RemoveMember(team *TeamId, email string) ([]User, error)
- func (client *Client) RemoveMembers(team *TeamId, emails []string) ([]User, 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) UpdateCheckHasRecentDeploy(input CheckHasRecentDeployUpdateInput) (*Check, error)
- func (client *Client) UpdateCheckManual(input CheckManualUpdateInput) (*Check, error)
- func (client *Client) UpdateCheckRepositoryFile(input CheckRepositoryFileUpdateInput) (*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) 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 graphql.ID, contact ContactInput) (*Contact, 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 (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) UpdateUser(user string, input UserInput) (*User, error)
- func (client *Client) Validate() error
- type ClientSettings
- type Connection
- type ConnectiveEnum
- type Contact
- type ContactCreateInput
- type ContactDeleteInput
- type ContactInput
- type ContactType
- type ContactUpdateInput
- type CustomEventCheckFragment
- type DeleteInput
- type Filter
- type FilterConnection
- type FilterCreateInput
- type FilterPredicate
- type FilterUpdateInput
- type FrequencyTimeScale
- type GitBranchProtectionCheckFragment
- type Group
- func (g *Group) ChildTeams(client *Client) ([]TeamId, error)
- func (g *Group) DescendantRepositories(client *Client) ([]RepositoryId, error)
- func (g *Group) DescendantServices(client *Client) ([]ServiceId, error)
- func (g *Group) DescendantSubgroups(client *Client) ([]GroupId, error)
- func (g *Group) DescendantTeams(client *Client) ([]TeamId, error)
- func (g *Group) Members(client *Client) ([]UserId, error)
- type GroupConnection
- type GroupId
- type GroupInput
- type HasRecentDeployCheckFragment
- type IdResponsePayload
- type IdentifierInput
- type Integration
- type IntegrationConnection
- 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 SetMaxRetries(amount int) Option
- func SetPageSize(size int) Option
- func SetTestURL(url string) Option
- func SetTimeout(amount time.Duration) Option
- func SetURL(url string) Option
- func SetUserAgentExtra(extra string) Option
- type PageInfo
- type PayloadVariables
- type Predicate
- type PredicateInput
- type PredicateKeyEnum
- type PredicateTypeEnum
- type PredicateUpdateInput
- type Repository
- type RepositoryConnection
- type RepositoryFileCheckFragment
- type RepositoryId
- type RepositoryPath
- type RepositorySearchCheckFragment
- type RepositoryServiceConnection
- type RepositoryServiceEdge
- type RepositoryTagConnection
- type ResourceDeletePayload
- type RestResponse
- type Service
- type ServiceConnection
- type ServiceCreateInput
- type ServiceDeleteInput
- type ServiceId
- type ServiceMaturity
- type ServiceOwnershipCheckFragment
- type ServicePropertyCheckFragment
- type ServicePropertyTypeEnum
- type ServiceRepository
- type ServiceRepositoryConnection
- type ServiceRepositoryCreateInput
- type ServiceRepositoryEdge
- type ServiceRepositoryUpdateInput
- type ServiceUpdateInput
- 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 TeamMembershipCreateInput
- type TeamMembershipDeleteInput
- type TeamMembershipUserInput
- type TeamUpdateInput
- type Tier
- 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 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 AllAlertSourceTypeEnum ¶
func AllAlertSourceTypeEnum() []string
All AlertSourceTypeEnum as []string
func AllAliasOwnerTypeEnum ¶
func AllAliasOwnerTypeEnum() []string
All AliasOwnerTypeEnum as []string
func AllFrequencyTimeScale ¶
func AllFrequencyTimeScale() []string
All FrequencyTimeScale as []string
func AllServicePropertyTypeEnum ¶
func AllServicePropertyTypeEnum() []string
All ServicePropertyTypeEnum 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 FormatErrors ¶
func FormatErrors(errs []OpsLevelErrors) error
func NewISO8601Date ¶
func NewRestClient ¶
func NewRestClient(options ...Option) *resty.Client
Types ¶
type AlertSourceTypeEnum ¶
type AlertSourceTypeEnum string
AlertSourceTypeEnum represents the type of the alert source.
const ( AlertSourceTypeEnumPagerduty AlertSourceTypeEnum = "pagerduty" // A PagerDuty alert source (aka service). AlertSourceTypeEnumDatadog AlertSourceTypeEnum = "datadog" // A Datadog alert source (aka monitor). AlertSourceTypeEnumOpsgenie AlertSourceTypeEnum = "opsgenie" // An Opsgenie 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 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 CategoryBreakdown ¶
type CategoryConnection ¶
func (*CategoryConnection) Hydrate ¶
func (conn *CategoryConnection) Hydrate(client *Client) error
type CategoryCreateInput ¶
type CategoryCreateInput struct {
Name string `json:"name"`
}
type CategoryDeleteInput ¶
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 graphql.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"` RepositorySearchCheckFragment `graphql:"... on RepositorySearchCheck"` ServiceOwnershipCheckFragment `graphql:"... on ServiceOwnershipCheck"` ServicePropertyCheckFragment `graphql:"... on ServicePropertyCheck"` TagDefinedCheckFragment `graphql:"... on TagDefinedCheck"` ToolUsageCheckFragment `graphql:"... on ToolUsageCheck"` }
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 ¶
func (*CheckConnection) Hydrate ¶
func (conn *CheckConnection) Hydrate(client *Client) error
type CheckCreateInput ¶
type CheckCreateInput struct { Name string `json:"name"` Enabled bool `json:"enabled"` EnableOn *iso8601.Time `json:"enableOn,omitempty"` Category graphql.ID `json:"categoryId"` Level graphql.ID `json:"levelId"` Owner *graphql.ID `json:"ownerId,omitempty"` Filter *graphql.ID `json:"filterId,omitempty"` Notes string `json:"notes,omitempty"` }
func (*CheckCreateInput) GetCheckCreateInput ¶
func (c *CheckCreateInput) GetCheckCreateInput() *CheckCreateInput
type CheckCreateInputProvider ¶
type CheckCreateInputProvider interface {
GetCheckCreateInput() *CheckCreateInput
}
type CheckCustomEventCreateInput ¶
type CheckCustomEventCreateInput struct { CheckCreateInput Integration graphql.ID `json:"integrationId"` ServiceSelector string `json:"serviceSelector"` SuccessCondition string `json:"successCondition"` Message string `json:"resultMessage,omitempty"` PassPending *bool `json:"passPending,omitempty"` }
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 *graphql.ID `json:"integrationId,omitempty"` }
type CheckDeleteInput ¶
type CheckGitBranchProtectionCreateInput ¶
type CheckGitBranchProtectionCreateInput struct {
CheckCreateInput
}
type CheckGitBranchProtectionUpdateInput ¶
type CheckGitBranchProtectionUpdateInput struct {
CheckUpdateInput
}
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 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 CheckServiceOwnershipCreateInput ¶
type CheckServiceOwnershipCreateInput struct { CheckCreateInput RequireContactMethod *bool `json:"requireContactMethod,omitempty"` ContactMethod *ContactType `json:"contactMethod,omitempty"` }
type CheckServiceOwnershipUpdateInput ¶
type CheckServiceOwnershipUpdateInput struct { CheckUpdateInput RequireContactMethod *bool `json:"requireContactMethod,omitempty"` ContactMethod *ContactType `json:"contactMethod,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 ( CheckStatusPassed CheckStatus = "passed" // The check evaluated to a truthy value based on some conditions. CheckStatusFailed CheckStatus = "failed" // The check evaluated to a falsy 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"` EnvironmentPredicate *PredicateInput `json:"environmentPredicate,omitempty"` }
type CheckToolUsageUpdateInput ¶
type CheckToolUsageUpdateInput struct { CheckUpdateInput ToolCategory ToolCategory `json:"toolCategory,omitempty"` ToolNamePredicate *PredicateInput `json:"toolNamePredicate,omitempty"` EnvironmentPredicate *PredicateInput `json:"environmentPredicate,omitempty"` }
type CheckType ¶
type CheckType string
CheckType represents the type of check.
const ( 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. CheckTypeServiceProperty CheckType = "service_property" // Verifies that a service property is set or matches a specified format. CheckTypeHasServiceConfig CheckType = "has_service_config" // Verifies that the service is maintained though the use of an opslevel.yml service config. CheckTypeHasRepository CheckType = "has_repository" // Verifies that the service has a repository integrated. CheckTypeToolUsage CheckType = "tool_usage" // Verifies that the service is using a tool of a particular category or name. CheckTypeTagDefined CheckType = "tag_defined" // Verifies that the service has the specified tag defined. 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). CheckTypeRepoSearch CheckType = "repo_search" // Searches the service's repository and verifies if any file matches the given contents. CheckTypeCustom CheckType = "custom" // Allows for the creation of programmatic checks that use an API to mark the status as passing or failing. CheckTypePayload CheckType = "payload" // Requires a payload integration api call to complete a check for the service. CheckTypeManual CheckType = "manual" // Requires a service owner to manually complete a check for the service. CheckTypeGeneric CheckType = "generic" // Requires a generic integration api call to complete a series of checks for multiple services. CheckTypeAlertSourceUsage CheckType = "alert_source_usage" // Verifies that the service has an alert source of a particular type or name. CheckTypeGitBranchProtection CheckType = "git_branch_protection" // Verifies that all the repositories on the service have branch protection enabled. )
type CheckUpdateInput ¶
type CheckUpdateInput struct { Id graphql.ID `json:"id"` Name string `json:"name,omitempty"` Enabled *bool `json:"enabled,omitempty"` EnableOn *iso8601.Time `json:"enableOn,omitempty"` Category *graphql.ID `json:"categoryId,omitempty"` Level *graphql.ID `json:"levelId,omitempty"` Owner *graphql.ID `json:"ownerId,omitempty"` Filter *graphql.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) AssignTagForAlias ¶
func (*Client) AssignTagForId ¶
func (*Client) AssignTags ¶
func (client *Client) AssignTags(input TagAssignInput) ([]Tag, error)
func (*Client) AssignTagsForAlias ¶
func (*Client) AssignTagsForId ¶
func (*Client) ConnectServiceRepository ¶
func (client *Client) ConnectServiceRepository(service *ServiceId, repository *Repository) (*ServiceRepository, 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) 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) 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) 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) 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) CreateTags ¶
func (*Client) CreateTagsForId ¶
func (*Client) CreateTeam ¶
func (client *Client) CreateTeam(input TeamCreateInput) (*Team, error)
func (*Client) CreateTool ¶
func (client *Client) CreateTool(input ToolCreateInput) (*Tool, error)
func (*Client) DeleteAlias ¶
func (client *Client) DeleteAlias(input AliasDeleteInput) error
func (*Client) DeleteGroupWithAlias ¶
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) DeleteTeamAlias ¶
func (*Client) DeleteTeamWithAlias ¶
func (*Client) DeleteTeamWithId
deprecated
func (*Client) DeleteUser ¶
func (*Client) GetGroupWithAlias ¶
func (*Client) GetIntegration ¶
func (client *Client) GetIntegration(id graphql.ID) (*Integration, error)
func (*Client) GetRepository ¶
func (client *Client) GetRepository(id graphql.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) GetServiceWithAlias ¶
func (*Client) GetTagsForService ¶
func (*Client) GetTagsForServiceWithAlias ¶
func (*Client) GetTeamCount ¶
func (*Client) GetTeamWithAlias ¶
func (*Client) GetToolsForService ¶
func (*Client) GetToolsForServiceWithAlias ¶
func (*Client) InitialPageVariables ¶
func (client *Client) InitialPageVariables() PayloadVariables
func (*Client) InviteUser ¶
func (*Client) ListCategories ¶
func (*Client) ListChecks ¶
func (*Client) ListFilters ¶
func (*Client) ListGroups ¶
func (*Client) ListIntegrations ¶
func (client *Client) ListIntegrations() ([]Integration, error)
func (*Client) ListLevels ¶
func (*Client) ListLifecycles ¶
func (*Client) ListRepositories ¶
func (client *Client) ListRepositories() ([]Repository, error)
func (*Client) ListRepositoriesWithTier ¶
func (client *Client) ListRepositoriesWithTier(tier string) ([]Repository, error)
func (*Client) ListServices ¶
func (*Client) ListServicesMaturity ¶
func (c *Client) ListServicesMaturity() ([]ServiceMaturity, error)
func (*Client) ListServicesWithFramework ¶
func (*Client) ListServicesWithLanguage ¶
func (*Client) ListServicesWithLifecycle ¶
func (*Client) ListServicesWithOwner ¶
func (*Client) ListServicesWithProduct ¶
func (*Client) ListServicesWithTag ¶
func (*Client) ListServicesWithTier ¶
func (*Client) ListTeamsWithManager ¶
func (*Client) RemoveMember ¶
func (*Client) RemoveMembers ¶
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) 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) 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) 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) 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) UpdateTeam ¶
func (client *Client) UpdateTeam(input TeamUpdateInput) (*Team, error)
func (*Client) UpdateTool ¶
func (client *Client) UpdateTool(input ToolUpdateInput) (*Tool, error)
func (*Client) UpdateUser ¶
type ClientSettings ¶
type ClientSettings struct {
// contains filtered or unexported fields
}
type Connection ¶
type Connection struct {
PageInfo PageInfo `graphql:"pageInfo"`
}
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 Contact ¶
type Contact struct { Address string DisplayName string Id graphql.ID Type ContactType }
type ContactCreateInput ¶
type ContactDeleteInput ¶
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 ( ContactTypeSlack ContactType = "slack" // A Slack channel contact method. ContactTypeSlackHandle ContactType = "slack_handle" // A Slack handle contact method. ContactTypeEmail ContactType = "email" // An email contact method. ContactTypeWeb ContactType = "web" // A website contact method. )
type ContactUpdateInput ¶
type ContactUpdateInput struct { Id graphql.ID `json:"id"` Type *ContactType `json:"type,omitempty"` DisplayName string `json:"displayName,omitempty"` Address string `json:"address,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 Filter ¶
type Filter struct { Connective ConnectiveEnum HtmlURL string Id graphql.ID Name string Predicates []FilterPredicate }
type FilterConnection ¶
func (*FilterConnection) Hydrate ¶
func (conn *FilterConnection) Hydrate(client *Client) error
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 graphql.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. FrequencyTimeScaleWeek FrequencyTimeScale = "week" // Consider the time scale of weeks. FrequencyTimeScaleMonth FrequencyTimeScale = "month" // Consider the time scale of months. 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) DescendantRepositories ¶
func (g *Group) DescendantRepositories(client *Client) ([]RepositoryId, error)
func (*Group) DescendantServices ¶
func (*Group) DescendantSubgroups ¶
type GroupConnection ¶
func (*GroupConnection) Hydrate ¶
func (conn *GroupConnection) Hydrate(client *Client) error
func (*GroupConnection) Query ¶
func (conn *GroupConnection) Query(client *Client, q interface{}, v PayloadVariables) ([]Group, error)
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 HasRecentDeployCheckFragment ¶
type HasRecentDeployCheckFragment struct {
Days int `graphql:"days"`
}
type IdResponsePayload ¶
type IdResponsePayload struct { Id graphql.ID `graphql:"deletedCheckId"` Errors []OpsLevelErrors }
func (*IdResponsePayload) Mutate ¶
func (p *IdResponsePayload) Mutate(client *Client, m interface{}, v PayloadVariables) error
type IdentifierInput ¶
type IdentifierInput struct { Id graphql.ID `graphql:"id" json:"id,omitempty"` Alias graphql.String `graphql:"alias" json:"alias,omitempty"` }
func NewIdentifier ¶
func NewIdentifier(value string) *IdentifierInput
type Integration ¶
type Integration struct { Id graphql.ID `json:"id"` Name string `json:"name"` Type string `json:"type"` }
func (*Integration) Alias ¶
func (self *Integration) Alias() string
type IntegrationConnection ¶
type IntegrationConnection struct { Nodes []Integration PageInfo PageInfo TotalCount graphql.Int }
func (*IntegrationConnection) Hydrate ¶
func (conn *IntegrationConnection) Hydrate(client *Client) error
type LevelConnection ¶
func (*LevelConnection) Hydrate ¶
func (conn *LevelConnection) Hydrate(client *Client) error
type LevelCreateInput ¶
type LevelDeleteInput ¶
type LevelUpdateInput ¶
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 SetMaxRetries ¶
func SetPageSize ¶
func SetTestURL ¶
SetTestUrl - Only use this when making test Clients
func SetTimeout ¶
func SetUserAgentExtra ¶
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 ( PredicateKeyEnumTierIndex PredicateKeyEnum = "tier_index" // Filter by `tier` field. PredicateKeyEnumLifecycleIndex PredicateKeyEnum = "lifecycle_index" // Filter by `lifecycle` field. PredicateKeyEnumLanguage PredicateKeyEnum = "language" // Filter by `language` field. PredicateKeyEnumFramework PredicateKeyEnum = "framework" // Filter by `framework` field. PredicateKeyEnumProduct PredicateKeyEnum = "product" // Filter by `product` field. PredicateKeyEnumName PredicateKeyEnum = "name" // Filter by `name` field. PredicateKeyEnumTags PredicateKeyEnum = "tags" // Filter by `tags` field. PredicateKeyEnumOwnerID PredicateKeyEnum = "owner_id" // Filter by `owner` field. PredicateKeyEnumGroupIDs PredicateKeyEnum = "group_ids" // Filter by group hierarchy. Will return resources who's owner is in the group ancestry chain. )
type PredicateTypeEnum ¶
type PredicateTypeEnum string
PredicateTypeEnum represents operations that can be used on predicates.
const ( 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). PredicateTypeEnumStartsWith PredicateTypeEnum = "starts_with" // Starts with a specific value. PredicateTypeEnumSatisfiesVersionConstraint PredicateTypeEnum = "satisfies_version_constraint" // Satisfies version constraint (tag value only). PredicateTypeEnumMatchesRegex PredicateTypeEnum = "matches_regex" // Matches a value using a regular expression. PredicateTypeEnumBelongsTo PredicateTypeEnum = "belongs_to" // Belongs to a group's hierarchy. PredicateTypeEnumSatisfiesJqExpression PredicateTypeEnum = "satisfies_jq_expression" // Satisfies an expression defined in jq. )
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 graphql.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 graphql.ID, directory string) *ServiceRepository
func (*Repository) Hydrate ¶
func (r *Repository) Hydrate(client *Client) error
type RepositoryConnection ¶
type RepositoryConnection struct { HiddenCount int Nodes []Repository OrganizationCount int OwnedCount int PageInfo PageInfo TotalCount int VisibleCount int }
func (*RepositoryConnection) Hydrate ¶
func (conn *RepositoryConnection) Hydrate(client *Client) error
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 graphql.Int }
type RepositoryServiceEdge ¶
type RepositoryServiceEdge struct { AtRoot bool Node ServiceId Paths []RepositoryPath ServiceRepositories []ServiceRepository }
type RepositoryTagConnection ¶
type ResourceDeletePayload ¶
type ResourceDeletePayload struct { Alias string `graphql:"deletedAlias" json:"alias,omitempty"` Id graphql.ID `graphql:"deletedId" json:"id,omitempty"` Errors []OpsLevelErrors `graphql:"errors" json:"errors,omitempty"` }
type RestResponse ¶
type RestResponse struct {
Result string `json:"result"`
}
type Service ¶
type Service struct { 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"` Product string `json:"product,omitempty"` Repositories ServiceRepositoryConnection `json:"repos,omitempty" graphql:"repos"` Tags TagConnection `json:"tags,omitempty"` Tier Tier `json:"tier,omitempty"` Tools ToolConnection `json:"tools,omitempty"` }
type ServiceConnection ¶
func (*ServiceConnection) Hydrate ¶
func (conn *ServiceConnection) Hydrate(client *Client) error
func (*ServiceConnection) Query ¶
func (conn *ServiceConnection) Query(client *Client, q interface{}, v PayloadVariables) ([]Service, error)
TODO: maybe we can find a way to merge ServiceConnection.Query & Hydrate
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 ServiceMaturity ¶
type ServiceMaturity struct { Name string MaturityReport MaturityReport }
type ServiceOwnershipCheckFragment ¶
type ServiceOwnershipCheckFragment struct { RequireContactMethod *bool `graphql:"requireContactMethod"` ContactMethod *ContactType `graphql:"contactMethod"` }
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. ServicePropertyTypeEnumName ServicePropertyTypeEnum = "name" // The name of a service. ServicePropertyTypeEnumLanguage ServicePropertyTypeEnum = "language" // The primary programming language of a service. ServicePropertyTypeEnumFramework ServicePropertyTypeEnum = "framework" // The primary software development framework of a service. ServicePropertyTypeEnumProduct ServicePropertyTypeEnum = "product" // The product that is associated with a service. ServicePropertyTypeEnumLifecycleIndex ServicePropertyTypeEnum = "lifecycle_index" // The index of the lifecycle a service belongs to. ServicePropertyTypeEnumTierIndex ServicePropertyTypeEnum = "tier_index" // The index of the tier a service belongs to. )
type ServiceRepository ¶
type ServiceRepositoryConnection ¶
type ServiceRepositoryConnection struct { Edges []ServiceRepositoryEdge PageInfo PageInfo TotalCount graphql.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 ServiceUpdateInput ¶
type ServiceUpdateInput struct { Id graphql.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 TagArgs ¶
func NewTagArgs ¶
type TagAssignInput ¶
type TagAssignInput struct { Id graphql.ID `json:"id,omitempty"` Alias string `json:"alias,omitempty"` Type TaggableResource `json:"type,omitempty"` Tags []TagInput `json:"tags"` }
type TagConnection ¶
type TagCreateInput ¶
type TagDefinedCheckFragment ¶
type TagDeleteInput ¶
type TagUpdateInput ¶
type TaggableResource ¶
type TaggableResource string
TaggableResource represents possible types to apply tags to.
const ( TaggableResourceService TaggableResource = "Service" // Used to identify a Service. TaggableResourceRepository TaggableResource = "Repository" // Used to identify a Repository. )
type Team ¶
type TeamConnection ¶
func (*TeamConnection) Hydrate ¶
func (conn *TeamConnection) Hydrate(client *Client) error
func (*TeamConnection) Query ¶
func (conn *TeamConnection) Query(client *Client, q interface{}, v PayloadVariables) ([]Team, error)
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 TeamMembershipCreateInput ¶
type TeamMembershipCreateInput struct { TeamId graphql.ID `json:"teamId"` Members []TeamMembershipUserInput `json:"members"` }
type TeamMembershipDeleteInput ¶
type TeamMembershipDeleteInput struct { TeamId graphql.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 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. 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. 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. ToolCategoryOther ToolCategory = "other" // Tools that do not fit into the available categories. )
type ToolConnection ¶
type ToolCreateInput ¶
type ToolDeleteInput ¶
type ToolUpdateInput ¶
type ToolUsageCheckFragment ¶
type ToolUsageCheckFragment struct { ToolCategory ToolCategory `graphql:"toolCategory"` ToolNamePredicate *Predicate `graphql:"toolNamePredicate"` EnvironmentPredicate *Predicate `graphql:"environmentPredicate"` }
type UserConnection ¶
type UserIdentifierInput ¶
type UserIdentifierInput struct { Id graphql.ID `graphql:"id" json:"id,omitempty"` Email graphql.String `graphql:"email" json:"email,omitempty"` }
func NewUserIdentifier ¶
func NewUserIdentifier(value string) UserIdentifierInput
Source Files
¶
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`. |