providers

package
v0.0.0-...-b9cf21a Latest Latest
Warning

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

Go to latest
Published: May 28, 2025 License: Apache-2.0, MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGithubClient

func NewGithubClient(p *project.Project, logger *slog.Logger) (*github.Client, error)

NewGithubClient returns a new Github client. If a GITHUB_TOKEN environment variable is set, it will use that token. Otherwise, it will use the provider secret. If neither are set, it will create an anonymous client.

Types

type GitProviderCreds

type GitProviderCreds struct {
	Token string
}

GitProviderCreds is the struct that holds the credentials for the Git provider

func GetGitProviderCreds

func GetGitProviderCreds(s *common.Secret, store *secrets.SecretStore, logger *slog.Logger) (GitProviderCreds, error)

GetGitProviderCreds loads the Git provider credentials from the given secret.

type GithubProviderCreds

type GithubProviderCreds struct {
	Token string
}

GithubProviderCreds is the struct that holds the credentials for the Github provider

func GetGithubProviderCreds

func GetGithubProviderCreds(p *project.Project, logger *slog.Logger) (GithubProviderCreds, error)

GetGithubProviderCreds loads the Github provider credentials from the project.

Jump to

Keyboard shortcuts

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