Documentation ¶
Overview ¶
Package vcsprovider is responsible for VCS providers
Index ¶
- Constants
- type CreateOptions
- type Options
- type Service
- func (a *Service) AddHandlers(r *mux.Router)
- func (a *Service) BeforeDeleteVCSProvider(hook func(context.Context, *VCSProvider) error)
- func (a *Service) Create(ctx context.Context, opts CreateOptions) (*VCSProvider, error)
- func (a *Service) Delete(ctx context.Context, id string) (*VCSProvider, error)
- func (a *Service) Get(ctx context.Context, id string) (*VCSProvider, error)
- func (a *Service) GetVCSClient(ctx context.Context, providerID string) (vcs.Client, error)
- func (a *Service) List(ctx context.Context, organization string) ([]*VCSProvider, error)
- func (a *Service) ListAllVCSProviders(ctx context.Context) ([]*VCSProvider, error)
- func (a *Service) ListVCSProvidersByGithubAppInstall(ctx context.Context, installID int64) ([]*VCSProvider, error)
- func (a *Service) Update(ctx context.Context, id string, opts UpdateOptions) (*VCSProvider, error)
- type UpdateOptions
- type VCSProvider
Constants ¶
View Source
const ( GithubAPIURL = "https://api.github.com" GithubHTTPURL = "https://github.com" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateOptions ¶
type Service ¶
type Service struct { *internal.HostnameService // contains filtered or unexported fields }
func NewService ¶
func (*Service) AddHandlers ¶
func (*Service) BeforeDeleteVCSProvider ¶
func (a *Service) BeforeDeleteVCSProvider(hook func(context.Context, *VCSProvider) error)
func (*Service) Create ¶
func (a *Service) Create(ctx context.Context, opts CreateOptions) (*VCSProvider, error)
func (*Service) GetVCSClient ¶
func (*Service) ListAllVCSProviders ¶
func (a *Service) ListAllVCSProviders(ctx context.Context) ([]*VCSProvider, error)
func (*Service) ListVCSProvidersByGithubAppInstall ¶
func (a *Service) ListVCSProvidersByGithubAppInstall(ctx context.Context, installID int64) ([]*VCSProvider, error)
ListVCSProvidersByGithubAppInstall is unauthenticated: only for internal use.
func (*Service) Update ¶
func (a *Service) Update(ctx context.Context, id string, opts UpdateOptions) (*VCSProvider, error)
type UpdateOptions ¶
type VCSProvider ¶
type VCSProvider struct { ID string Name string CreatedAt time.Time Organization string // name of OTF organization Hostname string // hostname of github/gitlab etc Kind vcs.Kind // github/gitlab etc. Not necessary if GithubApp is non-nil. Token *string // personal access token. GithubApp *github.InstallCredentials // mutually exclusive with Token. // contains filtered or unexported fields }
VCSProvider provides authenticated access to a VCS.
func (*VCSProvider) LogValue ¶
func (t *VCSProvider) LogValue() slog.Value
LogValue implements slog.LogValuer.
func (*VCSProvider) String ¶
func (t *VCSProvider) String() string
String provides a human meaningful description of the vcs provider, using the name if set; otherwise a name is constructed using both the underlying cloud kind and the auth kind.
func (*VCSProvider) Update ¶
func (t *VCSProvider) Update(opts UpdateOptions) error
Click to show internal directories.
Click to hide internal directories.