vercel

package
v1.1.15 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListEntities

func ListEntities(ctx context.ServiceContext, options *ListOptions) (interface{}, error)

func PrepareCredentials added in v1.1.5

func PrepareCredentials(ctx context.ServiceContext, options *PrepareCredentialsOptions) (map[string]interface{}, error)

func Sync

func Sync(ctx context.ServiceContext, options *SyncOptions) error

Types

type Creator

type Creator struct {
	UID      string `json:"uid"`
	Email    string `json:"email"`
	Username string `json:"username"`
}

type Credentials added in v1.1.14

type Credentials struct {
	TokenType      string `json:"token_type,omitempty"`
	AccessToken    string `json:"access_token,omitempty"`
	InstallationID string `json:"installation_id,omitempty"`
	UserID         string `json:"user_id,omitempty"`
	TeamID         string `json:"team_id,omitempty"`
}

func (*Credentials) ToMap added in v1.1.14

func (r *Credentials) ToMap() map[string]interface{}

type Deployment

type Deployment struct {
	Creator Creator `json:"creator"`
}

type InstallationAccessTokenResponse

type InstallationAccessTokenResponse struct {
	Token                string `json:"token"`
	ExpiresAt            string `json:"expires_at"`
	RespositorySelection string `json:"repository_selection"`
	Permissions          struct {
		ActionsVariables  string `json:"actions_variables"`
		CodespacesSecrets string `json:"codespaces_secrets"`
		Deployments       string `json:"deployments"`
		Metadata          string `json:"metadata"`
		Secrets           string `json:"secrets"`
	} `json:"permissions"`
}

type ListOptions

type ListOptions struct {
	Credentials *Credentials
}

type ListProjectsResponse

type ListProjectsResponse struct {
	Projects []Project `json:"projects"`
}

type PrepareCredentialsOptions added in v1.1.5

type PrepareCredentialsOptions struct {
	Code string
}

type Project

type Project struct {
	ID                string       `json:"id,omitempty"`
	Name              string       `json:"name,omitempty"`
	Username          string       `json:"username,omitempty"`
	AccountID         string       `json:"accountId,omitempty"`
	LatestDeployments []Deployment `json:"latestDeployments,omitempty"`
}

type RepositoryActionsSecretsPublicKeyResponse

type RepositoryActionsSecretsPublicKeyResponse struct {
	Key   string `json:"key"`
	KeyID string `json:"key_id"`
}

type SetupOptions

type SetupOptions struct {
	ConfigurationID string
	Source          string
	Next            string
	State           string
	OrgID           string
	Code            string
}

type SyncOptions

type SyncOptions struct {
	Credentials   *Credentials           `json:"credentials"`
	EntityDetails map[string]interface{} `json:"entity_details"`
	Data          *keypayload.KPMap      `json:"data"`
}

type VercelResponse

type VercelResponse struct {
	Error map[string]interface{} `json:"error,omitempty"`
}

type VercelSecret

type VercelSecret struct {
	Error       map[string]interface{} `json:"error,omitempty"`
	ID          string                 `json:"uid"`
	Name        string                 `json:"name"`
	UserID      string                 `json:"userId"`
	TeamID      string                 `json:"teamId"`
	Decryptable bool                   `json:"decryptable"`
	Value       struct {
		Data interface{} `json:"data"`
		Type string      `json:"type"`
	} `json:"value"`
}

func CreateSecret

func CreateSecret(ctx context.ServiceContext, client *clients.HTTPClient, name string, value interface{}, teamID *string) (*VercelSecret, error)

Creates a new Secret on Vercel. Docs: https://vercel.com/docs/rest-api/endpoints#create-a-new-secret

Jump to

Keyboard shortcuts

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