Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( FieldSchemaConfig = map[string]*framework.FieldSchema{ "token": { Type: framework.TypeString, Description: "The API access token required for authenticating requests to the GitLab API. This token must be a valid personal access token or any other type of token supported by GitLab for API access.", Required: true, DisplayAttrs: &framework.DisplayAttributes{ Name: "Token", Sensitive: true, }, }, "base_url": { Type: framework.TypeString, Required: true, DisplayAttrs: &framework.DisplayAttributes{ Name: "GitLab Base URL", }, Description: `The base URL of your GitLab instance. This could be the URL of a self-managed GitLab instance or the URL of the GitLab SaaS service (https://gitlab.com). The URL must be properly formatted, including the scheme (http or https). This field is essential as it determines the endpoint where API requests will be directed.`, }, "type": { Type: framework.TypeString, Required: true, AllowedValues: []any{ gitlabTypes.TypeSelfManaged, gitlabTypes.TypeSaaS, gitlabTypes.TypeDedicated, }, Description: `The type of GitLab instance you are connecting to. This could typically distinguish between 'self-managed' for on-premises GitLab installations or 'saas' or 'dedicated' for the GitLab SaaS offering. This field helps the plugin to adjust any necessary configurations or request patterns specific to the type of GitLab instance.`, DisplayAttrs: &framework.DisplayAttributes{ Name: "GitLab Type", }, }, "auto_rotate_token": { Type: framework.TypeBool, Default: false, Description: `Determines whether the plugin should automatically rotate the API access token as it approaches its expiration date. Enabling this feature ensures that the token is refreshed without manual intervention, reducing the risk of service disruption due to expired tokens.`, DisplayAttrs: &framework.DisplayAttributes{ Name: "Auto Rotate Token", }, }, "auto_rotate_before": { Type: framework.TypeDurationSecond, Description: `Specifies the duration, in seconds, before the token's expiration at which the auto-rotation should occur. The value must be set between a minimum of 24 hours (86400 seconds) and a maximum of 730 hours (2628000 seconds). This setting allows you to control how early the token rotation should happen, balancing between proactive rotation and maximizing token lifespan.`, Default: backend.DefaultConfigFieldAccessTokenRotate, DisplayAttrs: &framework.DisplayAttributes{ Name: "Auto Rotate Before", }, }, "config_name": { Type: framework.TypeString, Description: "Config name", Required: true, DisplayAttrs: &framework.DisplayAttributes{ Name: "Config name", }, }, } )
Functions ¶
This section is empty.
Types ¶
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider implements backend.PathProvider, backend.PeriodicHandler, and backend.InvalidateHandler for config paths.
func (*Provider) Invalidate ¶
Invalidate implements backend.InvalidateHandler. It clears the cached client when a config key changes.
Click to show internal directories.
Click to hide internal directories.