Documentation
¶
Index ¶
- func GetGitProviderFromUrl(uri string) string
- func ResourceGitCredential() *schema.Resource
- func ResourceRepo() *schema.Resource
- type GitCredentialList
- type GitCredentialRequest
- type GitCredentialResponse
- type GitCredentialsAPI
- func (a GitCredentialsAPI) Create(req GitCredentialRequest) (resp GitCredentialResponse, err error)
- func (a GitCredentialsAPI) Delete(id string) error
- func (a GitCredentialsAPI) List() ([]GitCredentialResponse, error)
- func (a GitCredentialsAPI) Read(id string) (resp GitCredentialResponse, err error)
- func (a GitCredentialsAPI) Update(id string, req GitCredentialRequest) error
- type ReposAPI
- func (a ReposAPI) Create(r reposCreateRequest) (ReposInformation, error)
- func (a ReposAPI) Delete(id string) error
- func (a ReposAPI) List(prefix string) ([]ReposInformation, error)
- func (a ReposAPI) ListAll() ([]ReposInformation, error)
- func (a ReposAPI) Read(id string) (ReposInformation, error)
- func (a ReposAPI) Update(id string, r map[string]string) error
- type ReposInformation
- type ReposListResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetGitProviderFromUrl ¶
func ResourceGitCredential ¶
func ResourceRepo ¶
Types ¶
type GitCredentialList ¶
type GitCredentialList struct {
Credentials []GitCredentialResponse `json:"credentials,omitempty"`
}
type GitCredentialRequest ¶
type GitCredentialResponse ¶
type GitCredentialResponse struct { ID int64 `json:"credential_id"` UserName string `json:"git_username"` Provider string `json:"git_provider"` }
func (GitCredentialResponse) GitCredentialID ¶
func (r GitCredentialResponse) GitCredentialID() string
ID returns job id as string
type GitCredentialsAPI ¶
type GitCredentialsAPI struct {
// contains filtered or unexported fields
}
GitCredentialsAPI exposes the Git Credentials API
func NewGitCredentialsAPI ¶
func NewGitCredentialsAPI(ctx context.Context, m any) GitCredentialsAPI
GitCredentialsAPI creates GitCredentialsAPI instance from provider meta
func (GitCredentialsAPI) Create ¶
func (a GitCredentialsAPI) Create(req GitCredentialRequest) (resp GitCredentialResponse, err error)
func (GitCredentialsAPI) Delete ¶
func (a GitCredentialsAPI) Delete(id string) error
func (GitCredentialsAPI) List ¶
func (a GitCredentialsAPI) List() ([]GitCredentialResponse, error)
func (GitCredentialsAPI) Read ¶
func (a GitCredentialsAPI) Read(id string) (resp GitCredentialResponse, err error)
func (GitCredentialsAPI) Update ¶
func (a GitCredentialsAPI) Update(id string, req GitCredentialRequest) error
type ReposAPI ¶
type ReposAPI struct {
// contains filtered or unexported fields
}
ReposAPI exposes the Repos API
func NewReposAPI ¶
NewReposAPI creates ReposAPI instance from provider meta
func (ReposAPI) Create ¶
func (a ReposAPI) Create(r reposCreateRequest) (ReposInformation, error)
func (ReposAPI) ListAll ¶
func (a ReposAPI) ListAll() ([]ReposInformation, error)
type ReposInformation ¶
type ReposInformation struct { ID int64 `json:"id"` Url string `json:"url" tf:"force_new"` Provider string `json:"provider,omitempty" tf:"computed,alias:git_provider,force_new"` Path string `json:"path,omitempty" tf:"computed,force_new"` // TODO: remove force_new after the Update API will support changing the path Branch string `json:"branch,omitempty" tf:"computed"` HeadCommitID string `json:"head_commit_id,omitempty" tf:"computed,alias:commit_hash"` }
ReposInformation provides information about given repository
func (ReposInformation) RepoID ¶
func (r ReposInformation) RepoID() string
RepoID returns job id as string
type ReposListResponse ¶
type ReposListResponse struct { NextPageToken string `json:"next_page_token,omitempty"` Repos []ReposInformation `json:"repos"` }
Click to show internal directories.
Click to hide internal directories.