Documentation ¶
Index ¶
Constants ¶
const ( // ProviderEndpointEnvKey holds config provider endpoint. //nolint:gosec // Potential hardcoded credentials ProviderEndpointEnvKey = "CONFIG_PROVIDER_ENDPOINT" // ProviderIdentifierEnvKey holds config provider identifier. ProviderIdentifierEnvKey = "CONFIG_PROVIDER_IDENTIFIER" // ProviderAPIKeyEnvKey holds config provider API key. //nolint:gosec // warns us about 'Potential hardcoded credentials' but there is no security issue here ProviderAPIKeyEnvKey = "CONFIG_PROVIDER_API_KEY" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Deployment ¶
Deployment returns deployment with Botkube configuration.
type DeploymentClient ¶
type DeploymentClient struct {
// contains filtered or unexported fields
}
DeploymentClient defines GraphQL client for Deployment.
func NewDeploymentClient ¶
func NewDeploymentClient(client GraphQLClient) *DeploymentClient
NewDeploymentClient initializes GraphQL client.
func (*DeploymentClient) GetConfigWithResourceVersion ¶
func (g *DeploymentClient) GetConfigWithResourceVersion(ctx context.Context) (Deployment, error)
GetConfigWithResourceVersion retrieves deployment by id.
func (*DeploymentClient) GetResourceVersion ¶
func (g *DeploymentClient) GetResourceVersion(ctx context.Context) (int, error)
GetResourceVersion retrieves resource version for Deployment.
type Gql ¶
type Gql struct {
// contains filtered or unexported fields
}
Gql defines GraphQL client data structure.
func NewDefaultGqlClient ¶
NewDefaultGqlClient initializes GraphQL client with default options.
func NewGqlClient ¶
NewGqlClient initializes GraphQL client.
type GraphQLClient ¶
type GraphQLClient interface { Client() *graphql.Client DeploymentID() string }
GraphQLClient defines GraphQL client.
type Option ¶
type Option func(*Gql)
Option define GraphQL client option.
func WithAPIKey ¶
WithAPIKey configures API key for GraphQL endpoint.
func WithDeploymentID ¶
WithDeploymentID configures deployment id for GraphQL endpoint.
func WithEndpoint ¶
WithEndpoint configures ApiURL for GraphQL endpoint.