Documentation ¶
Overview ¶
Package types package
Index ¶
- Constants
- type AccessTokenPayload
- type BuildOAuthAuthorizationURLInput
- type BuildRepositoryURLInput
- type CreateAccessTokenInput
- type CreateWebhookInput
- type DeleteWebhookInput
- type GetArchiveInput
- type GetDiffInput
- type GetDiffsInput
- type GetDiffsPayload
- type GetProjectInput
- type GetProjectPayload
- type TestConnectionInput
- type ToVCSEventTypeInput
- type WebhookPayload
Constants ¶
const ( JSONContentType = "application/json" FormContentType = "application/x-www-form-urlencoded" BearerAuthPrefix = "Bearer " V1WebhookEndpoint = "v1/vcs/events" )
Request method and content types, headers, etc. mainly for convenience.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessTokenPayload ¶
type AccessTokenPayload struct { ExpirationTimestamp *time.Time AccessToken string RefreshToken string }
AccessTokenPayload is the payload returned for creating / renewing an access token.
type BuildOAuthAuthorizationURLInput ¶
type BuildOAuthAuthorizationURLInput struct { ProviderURL url.URL OAuthClientID string OAuthState string RedirectURL string UseReadWriteScopes bool // When true, API requests read-write scopes. }
BuildOAuthAuthorizationURLInput is the input for building an authorization code URL that can be used to complete OAuth flow.
type BuildRepositoryURLInput ¶
BuildRepositoryURLInput is the input for building a repository URL.
type CreateAccessTokenInput ¶
type CreateAccessTokenInput struct { ProviderURL url.URL ClientID string ClientSecret string AuthorizationCode string RedirectURI string RefreshToken string // Required when renewing a token, only for GitLab. }
CreateAccessTokenInput is the input for creating an access token from a provider.
type CreateWebhookInput ¶
type CreateWebhookInput struct { ProviderURL url.URL AccessToken string RepositoryPath string WebhookToken []byte }
CreateWebhookInput is the input for creating a webhook.
type DeleteWebhookInput ¶
type DeleteWebhookInput struct { ProviderURL url.URL AccessToken string RepositoryPath string WebhookID string }
DeleteWebhookInput is the input for deleting a webhook.
type GetArchiveInput ¶
type GetArchiveInput struct { ProviderURL url.URL AccessToken string RepositoryPath string Ref string }
GetArchiveInput is the input for downloading a source archive.
type GetDiffInput ¶
type GetDiffInput struct { ProviderURL url.URL AccessToken string RepositoryPath string Ref string // Branch or commit ID to diff. }
GetDiffInput is the input for retrieving a diff for a ref.
type GetDiffsInput ¶
type GetDiffsInput struct { ProviderURL url.URL AccessToken string RepositoryPath string BaseRef string // What we're comparing from. (Parent branch, tag etc.) HeadRef string // What we're comparing to. (New branch, tag etc.) }
GetDiffsInput is the input for comparing two Git references.
type GetDiffsPayload ¶
type GetDiffsPayload struct {
AlteredFiles map[string]struct{}
}
GetDiffsPayload is the payload returned when retrieving diff(s).
type GetProjectInput ¶
GetProjectInput is the input for retrieving a project.
type GetProjectPayload ¶
type GetProjectPayload struct {
DefaultBranch string
}
GetProjectPayload is a subset of the payload returned when querying for a Git project.
type TestConnectionInput ¶
TestConnectionInput is the input for testing a connection with a provider.
type ToVCSEventTypeInput ¶
ToVCSEventTypeInput is the input for translating event types to VCSEventType equivalents.
type WebhookPayload ¶
type WebhookPayload struct {
WebhookID string
}
WebhookPayload is the payload for manipulating webhooks.