credentialssvc

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 16, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultInstallTTL = 10 * time.Minute

Variables

View Source
var (
	ErrInvalidInput          = xerror.ValidationFailed()
	ErrCredentialNotFound    = repocredentials.ErrCredentialNotFound
	ErrOAuthStateInvalid     = repocredentials.ErrOAuthStateInvalid
	ErrOAuthStateConsumed    = repocredentials.ErrOAuthStateConsumed
	ErrOAuthStateExpired     = repocredentials.ErrOAuthStateExpired
	ErrOAuthIntentConflict   = repocredentials.ErrOAuthIntentConflict
	ErrOAuthGrantConflict    = repocredentials.ErrOAuthGrantConflict
	ErrProviderNotConfigured = xerror.New(xerror.KindInvalidInput, "PROVIDER_NOT_CONFIGURED", "provider not configured")
	ErrProviderInvalidGrant  = xerror.New(xerror.KindInvalidInput, "PROVIDER_INVALID_GRANT", "provider invalid grant")
	ErrProviderGrantRevoked  = xerror.New(xerror.KindInvalidInput, "PROVIDER_GRANT_REVOKED", "provider grant revoked")
	ErrProviderUnavailable   = xerror.Unavailable(xerror.DataSource)
)

Functions

func CredentialKindStrings

func CredentialKindStrings() []string

CredentialKindStrings returns a slice of all String values of the enum

func CredentialOwnerKindStrings

func CredentialOwnerKindStrings() []string

CredentialOwnerKindStrings returns a slice of all String values of the enum

func CredentialStatusStrings

func CredentialStatusStrings() []string

CredentialStatusStrings returns a slice of all String values of the enum

func OAuthInstallIntentStrings

func OAuthInstallIntentStrings() []string

OAuthInstallIntentStrings returns a slice of all String values of the enum

func StaticCredentialTypeStrings

func StaticCredentialTypeStrings() []string

StaticCredentialTypeStrings returns a slice of all String values of the enum

Types

type AttachOrganizationGitLabConnectionParams

type AttachOrganizationGitLabConnectionParams struct {
	OrganizationSlug       slug.Slug `validate:"required"`
	DataSourceSlug         slug.Slug `validate:"required"`
	ExpectedRepositoryID   string    `validate:"required"`
	ExpectedCredentialSlug slug.Slug `validate:"required"`
}

type AuthorizationURLParams

type AuthorizationURLParams struct {
	PKCEVerifier   string
	State          string
	Scopes         []string
	OptionalScopes []string
}

type CompleteOAuthCallbackParams

type CompleteOAuthCallbackParams struct {
	Issuer string
	// ValidateWorkspace checks provider access before opening the finalization transaction.
	ValidateWorkspace func(context.Context, CredentialInstall, OAuthTokenSet) error `validate:"-"`
	// FinalizeWorkspace updates the source atomically with its grant.
	FinalizeWorkspace func(context.Context, CredentialInstall, OAuthTokenSet) error `validate:"-"`

	Provider string `validate:"required"`
	State    string `validate:"required"`
	Code     string `validate:"required"`
	Actor    model.EventActor
}

type CompleteOAuthCallbackResult

type CompleteOAuthCallbackResult struct {
	InstallSlug slug.Slug
	Owner       CredentialOwner
	Intent      OAuthInstallIntent
	Actor       model.EventActor
	Credential  CredentialMetadata
}

type ConfigureHTTPOAuthAppParams

type ConfigureHTTPOAuthAppParams struct {
	Owner CredentialOwner
	App   HTTPOAuthApp
}

type ConsumeOAuthInstallParams

type ConsumeOAuthInstallParams struct {
	Provider string `validate:"required"`
	State    string `validate:"required"`
}

ConsumeOAuthInstallParams identifies a terminal OAuth callback that must not exchange a grant.

type ContextualScopePlanningProvider

type ContextualScopePlanningProvider interface {
	ProviderAdapter
	OAuthScopePlanForInstall(OAuthScopePlanParams) OAuthScopePlan
}

ContextualScopePlanningProvider narrows provider-owned consent scopes for the requested access mode without allowing callers to name arbitrary scopes.

type CreateNotificationConnectionParams

type CreateNotificationConnectionParams struct {
	Provider string    `validate:"required,oneof=slack"`
	OrgSlug  slug.Slug `validate:"required"`
	Slug     slug.Slug
	Name     string `validate:"required,max=255"`
}

type CreateOrganizationGitLabConnectionParams

type CreateOrganizationGitLabConnectionParams struct {
	OrganizationSlug slug.Slug `validate:"required"`
	Provider         string    `validate:"required"`
}

type CreatePendingOAuthCredentialParams

type CreatePendingOAuthCredentialParams struct {
	Owner    CredentialOwner `validate:"required"`
	Provider string          `validate:"required"`
}

type CreateStaticSecretParams

type CreateStaticSecretParams struct {
	Owner          CredentialOwner `validate:"required"`
	CredentialType StaticCredentialType
	PlaintextJSON  []byte `validate:"required"`
	Actor          model.EventActor
}

type CredentialGrant

type CredentialGrant struct {
	Slug               slug.Slug
	Owner              CredentialOwner
	Kind               CredentialKind
	Provider           string
	Status             CredentialStatus
	EncryptedTokenSet  []byte
	AccessTokenExpires time.Time
	Scopes             []string
	Account            ProviderAccount
	LastRefreshedAt    *time.Time
	RevokedAt          *time.Time
	RotatedAt          *time.Time
	FailureCode        string
	FailureMessage     string
	CreatedAt          time.Time
	UpdatedAt          time.Time
	GrantUpdatedAt     time.Time
}

type CredentialInstall

type CredentialInstall struct {
	RepositorySetupSlug        slug.Slug
	RepositorySetupProjectSlug slug.Slug
	EncryptedPKCEVerifier      []byte
	ExpectedSourceRevision     *int64
	Slug                       slug.Slug
	Owner                      CredentialOwner
	Provider                   string
	StateHash                  string
	Intent                     OAuthInstallIntent
	ExpectedCredentialSlug     slug.Slug
	ExpectedCredentialStatus   CredentialStatus
	Actor                      model.EventActor
	RequestedScopes            []string
	ExpiresAt                  time.Time
	ConsumedAt                 *time.Time
	CreatedAt                  time.Time
	UpdatedAt                  time.Time
}

type CredentialKind

type CredentialKind int
const (
	CredentialKindStaticSecret CredentialKind = iota // static_secret
	CredentialKindOAuth2Grant                        // oauth2_grant
)

func CredentialKindString

func CredentialKindString(s string) (CredentialKind, error)

CredentialKindString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.

func CredentialKindValues

func CredentialKindValues() []CredentialKind

CredentialKindValues returns all values of the enum

func (CredentialKind) IsACredentialKind

func (i CredentialKind) IsACredentialKind() bool

IsACredentialKind returns "true" if the value is listed in the enum definition. "false" otherwise

func (CredentialKind) MarshalJSON

func (i CredentialKind) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface for CredentialKind

func (CredentialKind) MarshalText

func (i CredentialKind) MarshalText() ([]byte, error)

MarshalText implements the encoding.TextMarshaler interface for CredentialKind

func (CredentialKind) String

func (i CredentialKind) String() string

func (*CredentialKind) UnmarshalJSON

func (i *CredentialKind) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CredentialKind

func (*CredentialKind) UnmarshalText

func (i *CredentialKind) UnmarshalText(text []byte) error

UnmarshalText implements the encoding.TextUnmarshaler interface for CredentialKind

type CredentialMetadata

type CredentialMetadata struct {
	Slug      slug.Slug
	Kind      CredentialKind
	Status    CredentialStatus
	UpdatedAt time.Time
	OAuth     CredentialOAuthMetadata
}

type CredentialOAuthMetadata

type CredentialOAuthMetadata struct {
	Provider             string
	Scopes               []string
	Account              ProviderAccount
	AccessTokenExpiresAt time.Time
	LastRefreshedAt      *time.Time
	RevokedAt            *time.Time
	FailureCode          string
	FailureMessage       string
}

type CredentialOwner

type CredentialOwner struct {
	Kind                       CredentialOwnerKind
	OrgSlug                    slug.Slug `validate:"required"`
	DataSourceSlug             slug.Slug
	NotificationConnectionSlug slug.Slug
	EnvironmentSlug            slug.Slug
	EnvironmentSecretKey       string
}

type CredentialOwnerKind

type CredentialOwnerKind int
const (
	CredentialOwnerKindDataSource             CredentialOwnerKind = iota // data_source
	CredentialOwnerKindEnvironmentSecret                                 // environment_secret
	CredentialOwnerKindOrganizationGitLab                                // organization_gitlab
	CredentialOwnerKindNotificationConnection                            // notification_connection
)

func CredentialOwnerKindString

func CredentialOwnerKindString(s string) (CredentialOwnerKind, error)

CredentialOwnerKindString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.

func CredentialOwnerKindValues

func CredentialOwnerKindValues() []CredentialOwnerKind

CredentialOwnerKindValues returns all values of the enum

func (CredentialOwnerKind) IsACredentialOwnerKind

func (i CredentialOwnerKind) IsACredentialOwnerKind() bool

IsACredentialOwnerKind returns "true" if the value is listed in the enum definition. "false" otherwise

func (CredentialOwnerKind) MarshalJSON

func (i CredentialOwnerKind) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface for CredentialOwnerKind

func (CredentialOwnerKind) MarshalText

func (i CredentialOwnerKind) MarshalText() ([]byte, error)

MarshalText implements the encoding.TextMarshaler interface for CredentialOwnerKind

func (CredentialOwnerKind) String

func (i CredentialOwnerKind) String() string

func (*CredentialOwnerKind) UnmarshalJSON

func (i *CredentialOwnerKind) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CredentialOwnerKind

func (*CredentialOwnerKind) UnmarshalText

func (i *CredentialOwnerKind) UnmarshalText(text []byte) error

UnmarshalText implements the encoding.TextUnmarshaler interface for CredentialOwnerKind

type CredentialRecord

type CredentialRecord struct {
	Slug             slug.Slug
	Owner            CredentialOwner
	Kind             CredentialKind
	CredentialType   StaticCredentialType
	Status           CredentialStatus
	EncryptedPayload []byte
	CreatedAt        time.Time
	UpdatedAt        time.Time
	RotatedAt        *time.Time
	RevokedAt        *time.Time
	FailureCode      string
	FailureMessage   string
}

type CredentialStatus

type CredentialStatus int
const (
	CredentialStatusPending CredentialStatus = iota // pending
	CredentialStatusActive                          // active
	CredentialStatusFailed                          // failed
	CredentialStatusRevoked                         // revoked
	CredentialStatusRotated                         // rotated
)

func CredentialStatusString

func CredentialStatusString(s string) (CredentialStatus, error)

CredentialStatusString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.

func CredentialStatusValues

func CredentialStatusValues() []CredentialStatus

CredentialStatusValues returns all values of the enum

func (CredentialStatus) IsACredentialStatus

func (i CredentialStatus) IsACredentialStatus() bool

IsACredentialStatus returns "true" if the value is listed in the enum definition. "false" otherwise

func (CredentialStatus) MarshalJSON

func (i CredentialStatus) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface for CredentialStatus

func (CredentialStatus) MarshalText

func (i CredentialStatus) MarshalText() ([]byte, error)

MarshalText implements the encoding.TextMarshaler interface for CredentialStatus

func (CredentialStatus) String

func (i CredentialStatus) String() string

func (*CredentialStatus) UnmarshalJSON

func (i *CredentialStatus) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for CredentialStatus

func (*CredentialStatus) UnmarshalText

func (i *CredentialStatus) UnmarshalText(text []byte) error

UnmarshalText implements the encoding.TextUnmarshaler interface for CredentialStatus

type ExchangeCodeParams

type ExchangeCodeParams struct {
	PKCEVerifier string
	Issuer       string
	Code         string
	// RequestedScopes comes from the stored install, never from the callback.
	RequestedScopes []string
}

type FindOAuthInstallParams

type FindOAuthInstallParams struct {
	Provider string `validate:"required"`
	State    string `validate:"required"`
}

type FullService

type FullService interface {
	Service
	ProofResolver
	CheckProofCredential(context.Context, proofevidence.Grant) error
	PipelineWebhookSecretLifecycleService
	ResolvePipelineWebhookSecret(context.Context, ResolvePipelineWebhookSecretParams) ([]byte, error)
}

func New

func New(
	txm postgres.TransactionManager,
	repo repocredentials.Repository,
	enc crypto.CredentialCipher,
	providers ProviderRegistry,
	clock clock.Clock,
	allowPrivateDataSourceHosts bool,
) (FullService, error)

New creates the shared credential lifecycle service.

type HTTPOAuthApp

type HTTPOAuthApp struct {
	Config            httpoauth.Config `json:"config"`
	ClientSecret      string           `json:"client_secret"`
	RedirectURI       string           `json:"redirect_uri"`
	Destination       string           `json:"destination"`
	AllowPrivateHosts bool             `json:"allow_private_hosts"`
}

HTTPOAuthApp is encrypted both as desired source configuration and as a grant/install snapshot. AllowPrivateHosts is supplied only by the deployment's validated data-source policy.

type IssuedPipelineWebhookSecret

type IssuedPipelineWebhookSecret struct {
	KeyVersion int
	Value      string
}

type ListProviderRepositoriesParams

type ListProviderRepositoriesParams struct {
	Owner    CredentialOwner `validate:"required"`
	Provider string          `validate:"required"`
}

type NotificationConnection

type NotificationConnection struct {
	Slug      slug.Slug
	Name      string
	Provider  string
	Status    CredentialStatus
	Account   ProviderAccount
	UpdatedAt time.Time
}

type OAuthInstallIntent

type OAuthInstallIntent int
const (
	OAuthInstallIntentCreate OAuthInstallIntent = iota // create_grant
	OAuthInstallIntentRotate                           // rotate_grant
)

func OAuthInstallIntentString

func OAuthInstallIntentString(s string) (OAuthInstallIntent, error)

OAuthInstallIntentString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.

func OAuthInstallIntentValues

func OAuthInstallIntentValues() []OAuthInstallIntent

OAuthInstallIntentValues returns all values of the enum

func (OAuthInstallIntent) IsAOAuthInstallIntent

func (i OAuthInstallIntent) IsAOAuthInstallIntent() bool

IsAOAuthInstallIntent returns "true" if the value is listed in the enum definition. "false" otherwise

func (OAuthInstallIntent) MarshalJSON

func (i OAuthInstallIntent) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface for OAuthInstallIntent

func (OAuthInstallIntent) MarshalText

func (i OAuthInstallIntent) MarshalText() ([]byte, error)

MarshalText implements the encoding.TextMarshaler interface for OAuthInstallIntent

func (OAuthInstallIntent) String

func (i OAuthInstallIntent) String() string

func (*OAuthInstallIntent) UnmarshalJSON

func (i *OAuthInstallIntent) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for OAuthInstallIntent

func (*OAuthInstallIntent) UnmarshalText

func (i *OAuthInstallIntent) UnmarshalText(text []byte) error

UnmarshalText implements the encoding.TextUnmarshaler interface for OAuthInstallIntent

type OAuthScopePlan

type OAuthScopePlan struct {
	Required []string
	Optional []string
}

OAuthScopePlan separates consent-blocking scopes from best-effort scopes.

type OAuthScopePlanParams

type OAuthScopePlanParams struct {
	IncludeWriteScopes bool
	AccessMode         string
}

type OAuthTokenSet

type OAuthTokenSet struct {
	SlackWebhookURL string          `json:"slack_webhook_url,omitempty"`
	HTTPApp         *HTTPOAuthApp   `json:"http_app,omitempty"`
	AccessToken     string          `json:"access_token"`
	RefreshToken    string          `json:"refresh_token"`
	ExpiresAt       time.Time       `json:"expires_at"`
	Scopes          []string        `json:"scopes"`
	Account         ProviderAccount `json:"account"`
}

type OrganizationGitLabConnection

type OrganizationGitLabConnection struct {
	OrganizationSlug slug.Slug
	Credential       CredentialMetadata
}

type PipelineWebhookSecretLifecycleService

type PipelineWebhookSecretLifecycleService interface {
	IssuePipelineWebhookSecret(context.Context, PipelineWebhookSecretParams) (IssuedPipelineWebhookSecret, error)
	RevokePipelineWebhookSecrets(context.Context, PipelineWebhookSecretParams) error
}

type PipelineWebhookSecretParams

type PipelineWebhookSecretParams struct {
	OrgSlug, ProjectSlug, EnvironmentSlug, TriggerSlug slug.Slug `validate:"required"`
}

type ProofResolver

type ProofResolver interface {
	ResolveProofCredential(context.Context, proofevidence.Grant) (RuntimeCredential, error)
}

ProofResolver exposes no ordinary runtime, Git, refresh, or secret-write APIs.

type ProviderAccount

type ProviderAccount struct {
	ID          string
	Name        string
	Email       string
	ChannelID   string `json:",omitempty"`
	ChannelName string `json:",omitempty"`
}

type ProviderAdapter

type ProviderAdapter interface {
	AuthorizationURL(ctx context.Context, params AuthorizationURLParams) (string, error)
	ExchangeCode(ctx context.Context, params ExchangeCodeParams) (OAuthTokenSet, error)
	Refresh(ctx context.Context, params RefreshParams) (OAuthTokenSet, error)
	Revoke(ctx context.Context, params RevokeProviderGrantParams) error
}

type ProviderConnectorInstall

type ProviderConnectorInstall struct {
	Slug             slug.Slug
	Provider         string
	AuthorizationURL string
	State            string
	ExpiresAt        time.Time
	Intent           OAuthInstallIntent
	RequestedScopes  []string
}

type ProviderRegistry

type ProviderRegistry map[string]ProviderAdapter

type ProviderRepository

type ProviderRepository struct {
	ID            string
	Name          string
	FullName      string
	WebURL        string
	CloneURL      string
	DefaultBranch string
}

type ProviderRepositoryService

type ProviderRepositoryService interface {
	ListProviderRepositories(context.Context, ListProviderRepositoriesParams) ([]ProviderRepository, error)
	ResolveProviderRepository(context.Context, ResolveProviderRepositoryParams) (ProviderRepository, error)
	ResolveProviderRepositoryWithToken(context.Context, ResolveProviderRepositoryWithTokenParams) (ProviderRepository, error)
}

type RefreshGrantParams

type RefreshGrantParams struct {
	Owner CredentialOwner `validate:"required"`
	Actor model.EventActor
}

type RefreshParams

type RefreshParams struct {
	RefreshToken string
	Scopes       []string
}

type RepositoryProvider

type RepositoryProvider interface {
	ProviderAdapter
	ListRepositories(context.Context, string) ([]ProviderRepository, error)
	ResolveRepository(context.Context, string, string) (ProviderRepository, error)
}

type ResolvePipelineWebhookSecretParams

type ResolvePipelineWebhookSecretParams struct {
	OrgSlug, ProjectSlug, EnvironmentSlug, TriggerSlug slug.Slug `validate:"required"`
	KeyVersion                                         int       `validate:"required,min=1"`
}

type ResolveProviderRepositoryParams

type ResolveProviderRepositoryParams struct {
	Owner        CredentialOwner `validate:"required"`
	Provider     string          `validate:"required"`
	RepositoryID string          `validate:"required"`
}

type ResolveProviderRepositoryWithTokenParams

type ResolveProviderRepositoryWithTokenParams struct {
	Provider     string `validate:"required"`
	AccessToken  string `validate:"required"`
	RepositoryID string `validate:"required"`
}

type ResolveRuntimeCredentialParams

type ResolveRuntimeCredentialParams struct {
	Owner CredentialOwner `validate:"required"`
}

type RevokeParams

type RevokeParams struct {
	Owner CredentialOwner `validate:"required"`
	Actor model.EventActor
}

type RevokeProviderGrantParams

type RevokeProviderGrantParams struct {
	AccessToken  string
	RefreshToken string
}

type RotateParams

type RotateParams struct {
	Owner              CredentialOwner `validate:"required"`
	Actor              model.EventActor
	IncludeWriteScopes bool
	AccessMode         string `validate:"omitempty,oneof=selected_files"`
}

type RuntimeCredential

type RuntimeCredential struct {
	Kind          CredentialKind
	Version       string
	PlaintextJSON []byte
}

type ScopePlanningProvider

type ScopePlanningProvider interface {
	ProviderAdapter
	OAuthScopePlan() OAuthScopePlan
}

ScopePlanningProvider supplies a provider-owned authorization scope plan. It prevents connector install callers from escalating provider permissions.

type Service

type Service interface {
	ConnectNotificationConnection(context.Context, CredentialOwner, model.EventActor) (ProviderConnectorInstall, error)
	CreateNotificationConnection(context.Context, CreateNotificationConnectionParams) (NotificationConnection, error)
	ListNotificationConnections(context.Context, slug.Slug) ([]NotificationConnection, error)
	ConnectHTTPOAuth(context.Context, StartOAuthInstallParams) (*ProviderConnectorInstall, error)
	AcquireHTTPOAuthTestCredential(context.Context, HTTPOAuthApp) (RuntimeCredential, error)
	ConfigureHTTPOAuthApp(context.Context, ConfigureHTTPOAuthAppParams) error
	ConnectHTTPOAuthClientCredentials(context.Context, ResolveRuntimeCredentialParams) (CredentialMetadata, error)
	CreateStaticSecret(context.Context, CreateStaticSecretParams) (CredentialMetadata, error)
	CreatePendingOAuthCredential(context.Context, CreatePendingOAuthCredentialParams) (CredentialMetadata, error)
	CreateOrganizationGitLabConnection(context.Context, CreateOrganizationGitLabConnectionParams) (OrganizationGitLabConnection, error)
	AttachOrganizationGitLabConnection(context.Context, AttachOrganizationGitLabConnectionParams) error
	GetOrganizationGitLabConnection(context.Context, slug.Slug) (OrganizationGitLabConnection, error)
	ListOrganizationGitLabRepositories(context.Context, slug.Slug) ([]ProviderRepository, error)
	StartOAuthInstall(context.Context, StartOAuthInstallParams) (ProviderConnectorInstall, error)
	FindOAuthInstall(context.Context, FindOAuthInstallParams) (CredentialInstall, error)
	ConsumeOAuthInstall(context.Context, ConsumeOAuthInstallParams) (CredentialInstall, error)
	CompleteOAuthCallback(context.Context, CompleteOAuthCallbackParams) (CompleteOAuthCallbackResult, error)
	ResolveRuntimeCredential(context.Context, ResolveRuntimeCredentialParams) (RuntimeCredential, error)
	Refresh(context.Context, RefreshGrantParams) (CredentialMetadata, error)
	Revoke(context.Context, RevokeParams) (CredentialMetadata, error)
	Rotate(context.Context, RotateParams) (ProviderConnectorInstall, error)
}

type StartOAuthInstallParams

type StartOAuthInstallParams struct {
	RepositorySetupSlug        slug.Slug
	RepositorySetupProjectSlug slug.Slug
	Owner                      CredentialOwner `validate:"required"`
	Provider                   string          `validate:"required"`
	RequestedScopes            []string
	IncludeWriteScopes         bool
	AccessMode                 string `validate:"omitempty,oneof=selected_files"`
	Intent                     OAuthInstallIntent
	Actor                      model.EventActor
}

type StaticCredentialType

type StaticCredentialType int
const (
	StaticCredentialTypePostgres          StaticCredentialType = iota // postgres
	StaticCredentialTypeMySQL                                         // mysql
	StaticCredentialTypeBigQuery                                      // bigquery
	StaticCredentialTypeHTTP                                          // http
	StaticCredentialTypeHubSpot                                       // hubspot
	StaticCredentialTypeMongoDB                                       // mongodb
	StaticCredentialTypeFTP                                           // ftp
	StaticCredentialTypeGit                                           // git
	StaticCredentialTypeS3                                            // s3
	StaticCredentialTypeEnvironmentSecret                             // environment_secret
	StaticCredentialTypeSnowflake                                     // snowflake
)

func StaticCredentialTypeString

func StaticCredentialTypeString(s string) (StaticCredentialType, error)

StaticCredentialTypeString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.

func StaticCredentialTypeValues

func StaticCredentialTypeValues() []StaticCredentialType

StaticCredentialTypeValues returns all values of the enum

func (StaticCredentialType) IsAStaticCredentialType

func (i StaticCredentialType) IsAStaticCredentialType() bool

IsAStaticCredentialType returns "true" if the value is listed in the enum definition. "false" otherwise

func (StaticCredentialType) MarshalJSON

func (i StaticCredentialType) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface for StaticCredentialType

func (StaticCredentialType) MarshalText

func (i StaticCredentialType) MarshalText() ([]byte, error)

MarshalText implements the encoding.TextMarshaler interface for StaticCredentialType

func (StaticCredentialType) String

func (i StaticCredentialType) String() string

func (*StaticCredentialType) UnmarshalJSON

func (i *StaticCredentialType) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for StaticCredentialType

func (*StaticCredentialType) UnmarshalText

func (i *StaticCredentialType) UnmarshalText(text []byte) error

UnmarshalText implements the encoding.TextUnmarshaler interface for StaticCredentialType

Directories

Path Synopsis
provider
bigquery
Package bigquery implements the provider-owned Google OAuth2 boundary for BigQuery.
Package bigquery implements the provider-owned Google OAuth2 boundary for BigQuery.
googleworkspace
Package googleworkspace owns Google Workspace consent plans and OAuth grants.
Package googleworkspace owns Google Workspace consent plans and OAuth grants.
hubspot
Package hubspot implements the provider-owned OAuth2 exchange boundary for HubSpot.
Package hubspot implements the provider-owned OAuth2 exchange boundary for HubSpot.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL