dbt_cloud

package
v0.2.13 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	STATE_ACTIVE           = 1
	STATE_DELETED          = 2
	ID_DELIMITER           = ":"
	NUM_THREADS_CREDENTIAL = 6
)

Variables

This section is empty.

Functions

This section is empty.

Types

type APIError added in v0.2.1

type APIError struct {
	Data   interface{} `json:"data"`
	Status struct {
		Code             int    `json:"code"`
		DeveloperMessage string `json:"developer_message"`
		IsSuccess        bool   `json:"is_success"`
		UserMessage      string `json:"user_message"`
	} `json:"status"`
}

Parses the error we get to see if it is a 404 for a missing resource

type Adapter

type Adapter struct {
	ID                      *int            `json:"id,omitempty"`
	AccountID               int             `json:"account_id"`
	ProjectID               int             `json:"project_id"`
	CreatedByID             *int            `json:"created_by_id,omitempty"`
	CreatedByServiceTokenID *int            `json:"created_by_service_token_id,omitempty"`
	Metadata                AdapterMetadata `json:"metadata_json"`
	State                   int             `json:"state"`
	AdapterVersion          string          `json:"adapter_version"`
	CreatedAt               *string         `json:"created_at,omitempty"`
	UpdatedAt               *string         `json:"updated_at,omitempty"`
}

type AdapterMetadata

type AdapterMetadata struct {
	Title     string `json:"title"`
	DocsLink  string `json:"docs_link"`
	ImageLink string `json:"image_link"`
}

type AdapterResponse

type AdapterResponse struct {
	Data   Adapter        `json:"data"`
	Status ResponseStatus `json:"status"`
}

type AssignUserGroupsResponse added in v0.2.4

type AssignUserGroupsResponse struct {
	Data   []Group        `json:"data"`
	Status ResponseStatus `json:"status"`
}

type AuthResponse

type AuthResponse struct {
	Status ResponseStatus     `json:"status"`
	Data   []AuthResponseData `json:"data"`
}

AuthResponse -

type AuthResponseData

type AuthResponseData struct {
	DocsJobId                      int    `json:"docs_job_id"`
	FreshnessJobId                 int    `json:"freshness_job_id"`
	LockReason                     string `json:"lock_reason"`
	UnlockIfSubscriptionRenewed    bool   `json:"unlock_if_subscription_renewed"`
	ReadOnlySeats                  int    `json:"read_only_seats"`
	Id                             int    `json:"id"`
	Name                           string `json:"name"`
	State                          int    `json:"state"`
	Plan                           string `json:"plan"`
	PendingCancel                  bool   `json:"pending_cancel"`
	RunSlots                       int    `json:"run_slots"`
	DeveloperSeats                 int    `json:"developer_seats"`
	QueueLimit                     int    `json:"queue_limit"`
	PodMemoryRequestMebibytes      int    `json:"pod_memory_request_mebibytes"`
	RunDurationLimitSeconds        int    `json:"run_duration_limit_seconds"`
	EnterpriseAuthenticationMethod string `json:"enterprise_authentication_method"`
	EnterpriseLoginSlug            string `json:"enterprise_login_slug"`
	EnterpriseUniqueIdentifier     string `json:"enterprise_unique_identifier"`
	BillingEmailAddress            string `json:"billing_email_address"`
	Locked                         bool   `json:"locked"`
	DevelopFileSystem              bool   `json:"develop_file_system"`
	UnlockedAt                     string `json:"unlocked_at"`
	CreatedAt                      string `json:"created_at"`
	UpdatedAt                      string `json:"updated_at"`
	StarterRepoUrl                 string `json:"starter_repo_url"`
	SsoReauth                      bool   `json:"sso_reauth"`
	GitAuthLevel                   string `json:"git_auth_level"`
	DocsJob                        string `json:"docs_job"`
	FreshnessJob                   string `json:"freshness_job"`
	EnterpriseLoginUrl             string `json:"enterprise_login_url"`
}

type BigQueryConnection

type BigQueryConnection struct {
	ID                      *int                      `json:"id,omitempty"`
	AccountID               int                       `json:"account_id"`
	ProjectID               int                       `json:"project_id"`
	Name                    string                    `json:"name"`
	Type                    string                    `json:"type"`
	CreatedByID             *int                      `json:"created_by_id,omitempty"`
	CreatedByServiceTokenID *int                      `json:"created_by_service_token_id,omitempty"`
	State                   int                       `json:"state"`
	Created_At              *string                   `json:"created_at,omitempty"`
	Updated_At              *string                   `json:"updated_at,omitempty"`
	Details                 BigQueryConnectionDetails `json:"details"`
}

maybe try interface here

type BigQueryConnectionDetails

type BigQueryConnectionDetails struct {
	GcpProjectId            string  `json:"project_id"`
	TimeoutSeconds          int     `json:"timeout_seconds"`
	PrivateKeyId            string  `json:"private_key_id"`
	PrivateKey              string  `json:"private_key,omitempty"`
	ClientEmail             string  `json:"client_email"`
	ClientId                string  `json:"client_id"`
	AuthUri                 string  `json:"auth_uri"`
	TokenUri                string  `json:"token_uri"`
	AuthProviderX509CertUrl string  `json:"auth_provider_x509_cert_url"`
	ClientX509CertUrl       string  `json:"client_x509_cert_url"`
	Retries                 *int    `json:"retries,omitempty"`
	Location                *string `json:"location,omitempty"`
	MaximumBytesBilled      *int    `json:"maximum_bytes_billed,omitempty"`
	ExecutionProject        *string `json:"execution_project,omitempty"`
	Priority                *string `json:"priority,omitempty"`
	GcsBucket               *string `json:"gcs_bucket,omitempty"`
	DataprocRegion          *string `json:"dataproc_region,omitempty"`
	DataprocClusterName     *string `json:"dataproc_cluster_name,omitempty"`
	ApplicationSecret       string  `json:"application_secret,omitempty"`
	ApplicationId           string  `json:"application_id,omitempty"`
	IsConfiguredOAuth       bool    `json:"is_configured_for_oauth,omitempty"`
}

type BigQueryConnectionResponse

type BigQueryConnectionResponse struct {
	Data   BigQueryConnection `json:"data"`
	Status ResponseStatus     `json:"status"`
}

type BigQueryCredential

type BigQueryCredential struct {
	ID         *int   `json:"id"`
	Account_Id int    `json:"account_id"`
	Project_Id int    `json:"project_id"`
	Type       string `json:"type"`
	State      int    `json:"state"`
	Threads    int    `json:"threads"`
	Dataset    string `json:"schema"`
}

type BigQueryCredentialResponse

type BigQueryCredentialResponse struct {
	Data   BigQueryCredential `json:"data"`
	Status ResponseStatus     `json:"status"`
}

type Client

type Client struct {
	HostURL    string
	HTTPClient *http.Client
	Token      string
	AccountURL string
	AccountID  int
}

Client -

func NewClient

func NewClient(account_id *int, token *string, host_url *string) (*Client, error)

NewClient -

func (*Client) AssignUserGroups added in v0.2.4

func (c *Client) AssignUserGroups(userId int, groupIDs []int) (*AssignUserGroupsResponse, error)

func (*Client) CreateBigQueryConnection

func (c *Client) CreateBigQueryConnection(
	projectID int,
	name string,
	connectionType string,
	isActive bool,
	gcpProjectId string,
	timeoutSeconds int,
	privateKeyId string,
	privateKey string,
	clientEmail string,
	clientId string,
	authUri string,
	tokenUri string,
	authProviderX509CertUrl string,
	clientX509CertUrl string,
	retries *int,
	location *string,
	maximumBytesBilled *int,
	executionProject *string,
	priority *string,
	gcsBucket *string,
	dataprocRegion *string,
	dataprocClusterName *string,
	applicationSecret string,
	applicationId string) (*BigQueryConnection, error)

func (*Client) CreateBigQueryCredential

func (c *Client) CreateBigQueryCredential(projectId int, type_ string, isActive bool, dataset string, numThreads int) (*BigQueryCredential, error)

func (*Client) CreateConnection

func (c *Client) CreateConnection(projectID int, name string, connectionType string, privatelinkEndpointID string, isActive bool, account string, database string, warehouse string, role string, allowSSO *bool, clientSessionKeepAlive *bool, oAuthClientID string, oAuthClientSecret string, hostName string, port int, tunnelEnabled *bool, httpPath string, catalog string) (*Connection, error)

func (*Client) CreateDatabricksCredential

func (c *Client) CreateDatabricksCredential(projectId int, type_ string, targetName string, adapterId int, token string, catalog string, schema string, adapterType string) (*DatabricksCredential, error)

func (*Client) CreateEnvironment

func (c *Client) CreateEnvironment(
	isActive bool,
	projectId int,
	name string,
	dbtVersion string,
	type_ string,
	useCustomBranch bool,
	customBranch string,
	credentialId int,
	deploymentType string,
	extendedAttributesID int) (*Environment, error)

func (*Client) CreateEnvironmentVariable

func (c *Client) CreateEnvironmentVariable(projectID int, name string, environmentValues map[string]string) (*EnvironmentVariable, error)

func (*Client) CreateExtendedAttributes added in v0.2.9

func (c *Client) CreateExtendedAttributes(
	state int,
	projectId int,
	extendedAttributes json.RawMessage,
) (*ExtendedAttributes, error)

func (*Client) CreateGroup

func (c *Client) CreateGroup(name string, assignByDefault bool, ssoMappingGroups []string) (*Group, error)

func (*Client) CreateJob

func (c *Client) CreateJob(
	projectId int,
	environmentId int,
	name string,
	description string,
	executeSteps []string,
	dbtVersion string,
	isActive bool,
	triggers map[string]interface{},
	numThreads int,
	targetName string,
	generateDocs bool,
	runGenerateSources bool,
	scheduleType string,
	scheduleInterval int,
	scheduleHours []int,
	scheduleDays []int,
	scheduleCron string,
	deferringJobId int,
	deferringEnvironmentID int,
	selfDeferring bool,
	timeoutSeconds int,
	triggersOnDraftPR bool,
) (*Job, error)

func (*Client) CreateLicenseMap added in v0.2.6

func (c *Client) CreateLicenseMap(licenseType string, ssoLicenseMappingGroups []string) (*LicenseMap, error)

func (*Client) CreateNotification added in v0.2.3

func (c *Client) CreateNotification(
	userId int,
	onCancel []int,
	onFailure []int,
	onSuccess []int,
	state int,
	notificationType int,
	externalEmail *string) (*Notification, error)

func (*Client) CreatePostgresCredential

func (c *Client) CreatePostgresCredential(projectId int, isActive bool, type_ string, defaultSchema string, targetName string, username string, password string, numThreads int) (*PostgresCredential, error)

CreatePostgresCredential creates a new Postgres credential

func (*Client) CreateProject

func (c *Client) CreateProject(name string, dbtProjectSubdirectory string) (*Project, error)

func (*Client) CreateRepository

func (c *Client) CreateRepository(projectID int, remoteUrl string, isActive bool, gitCloneStrategy string, repositoryCredentialsID int, gitlabProjectID int, githubInstallationID int) (*Repository, error)

func (*Client) CreateServiceToken

func (c *Client) CreateServiceToken(
	name string,
	state int,
) (*ServiceToken, error)

func (*Client) CreateSnowflakeCredential

func (c *Client) CreateSnowflakeCredential(projectId int, type_ string, isActive bool, database string, role string, warehouse string, schema string, user string, password string, privateKey string, privateKeyPassphrase string, authType string, numThreads int) (*SnowflakeCredential, error)

func (*Client) CreateWebhook

func (c *Client) CreateWebhook(
	webhookId string,
	name string,
	description string,
	clientUrl string,
	eventTypes []string,
	jobIds []int,
	active bool,
) (*WebhookRead, error)

func (*Client) DeleteBigQueryCredential

func (c *Client) DeleteBigQueryCredential(credentialId, projectId string) (string, error)

func (*Client) DeleteConnection

func (c *Client) DeleteConnection(connectionID, projectID string) (string, error)

func (*Client) DeleteDatabricksCredential

func (c *Client) DeleteDatabricksCredential(credentialId, projectId string) (string, error)

func (*Client) DeleteEnvironment

func (c *Client) DeleteEnvironment(projectId, environmentId int) (string, error)

func (*Client) DeleteEnvironmentVariable

func (c *Client) DeleteEnvironmentVariable(environmentVariableName string, projectID int) (string, error)

func (*Client) DeleteExtendedAttributes added in v0.2.9

func (c *Client) DeleteExtendedAttributes(projectId, extendedAttributesID int) (string, error)

func (*Client) DeletePostgresCredential

func (c *Client) DeletePostgresCredential(credentialId, projectId string) (string, error)

DeletePostgresCredential deletes a Postgres credential by its ID

func (*Client) DeleteRepository

func (c *Client) DeleteRepository(repositoryID, projectID string) (string, error)

func (*Client) DeleteServiceToken

func (c *Client) DeleteServiceToken(serviceTokenID int) (string, error)

func (*Client) DeleteSnowflakeCredential

func (c *Client) DeleteSnowflakeCredential(credentialId, projectId string) (string, error)

func (*Client) DeleteWebhook

func (c *Client) DeleteWebhook(webhookId string) (string, error)

func (*Client) DestroyLicenseMap added in v0.2.6

func (c *Client) DestroyLicenseMap(licenseMapID int) error

func (*Client) GetBigQueryConnection

func (c *Client) GetBigQueryConnection(connectionID, projectID string) (*BigQueryConnection, error)

func (*Client) GetBigQueryCredential

func (c *Client) GetBigQueryCredential(projectId int, credentialId int) (*BigQueryCredential, error)

func (*Client) GetConnectedUser

func (c *Client) GetConnectedUser() (*User, error)

func (*Client) GetConnection

func (c *Client) GetConnection(connectionID, projectID string) (*Connection, error)

func (*Client) GetDatabricksCredential

func (c *Client) GetDatabricksCredential(projectId int, credentialId int) (*DatabricksCredential, error)

func (*Client) GetEnvironment

func (c *Client) GetEnvironment(projectId int, environmentId int) (*Environment, error)

func (*Client) GetEnvironmentVariable

func (c *Client) GetEnvironmentVariable(projectID int, environmentVariableName string) (*EnvironmentVariable, error)

func (*Client) GetExtendedAttributes added in v0.2.9

func (c *Client) GetExtendedAttributes(projectId int, extendedAttributesID int) (*ExtendedAttributes, error)

func (*Client) GetGroup

func (c *Client) GetGroup(groupID int) (*Group, error)

func (*Client) GetJob

func (c *Client) GetJob(jobID string) (*Job, error)

func (*Client) GetLicenseMap added in v0.2.6

func (c *Client) GetLicenseMap(licenseMapId int) (*LicenseMap, error)

func (*Client) GetNotification added in v0.2.3

func (c *Client) GetNotification(notificationID string) (*Notification, error)

func (*Client) GetPostgresCredential

func (c *Client) GetPostgresCredential(projectId int, credentialId int) (*PostgresCredential, error)

GetPostgresCredential retrieves a specific Postgres credential by its ID

func (*Client) GetPrivatelinkEndpoint

func (c *Client) GetPrivatelinkEndpoint(endpointName string, privatelinkEndpointURL string) (*PrivatelinkEndpoint, error)

func (*Client) GetProject

func (c *Client) GetProject(projectID string) (*Project, error)

func (*Client) GetProjectByName added in v0.2.10

func (c *Client) GetProjectByName(projectName string) (*Project, error)

func (*Client) GetRepository

func (c *Client) GetRepository(repositoryID, projectID string, fetch_deploy_key bool) (*Repository, error)

func (*Client) GetServiceToken

func (c *Client) GetServiceToken(serviceTokenID int) (*ServiceToken, error)

func (*Client) GetServiceTokenPermissions

func (c *Client) GetServiceTokenPermissions(serviceTokenID int) (*[]ServiceTokenPermission, error)

func (*Client) GetSnowflakeCredential

func (c *Client) GetSnowflakeCredential(projectId int, credentialId int) (*SnowflakeCredential, error)

func (*Client) GetUser

func (c *Client) GetUser(email string) (*User, error)

func (*Client) GetUserGroups added in v0.2.4

func (c *Client) GetUserGroups(userId int) (*UserGroupsCurrentAccount, error)

func (*Client) GetUsers added in v0.2.13

func (c *Client) GetUsers() ([]User, error)

func (*Client) GetWebhook

func (c *Client) GetWebhook(webhookID string) (*WebhookRead, error)

func (*Client) UpdateBigQueryConnection

func (c *Client) UpdateBigQueryConnection(connectionID, projectID string, connection BigQueryConnection) (*BigQueryConnection, error)

func (*Client) UpdateBigQueryCredential

func (c *Client) UpdateBigQueryCredential(projectId int, credentialId int, BigQueryCredential BigQueryCredential) (*BigQueryCredential, error)

func (*Client) UpdateConnection

func (c *Client) UpdateConnection(connectionID, projectID string, connection Connection) (*Connection, error)

func (*Client) UpdateDatabricksCredential

func (c *Client) UpdateDatabricksCredential(projectId int, credentialId int, databricksCredential DatabricksCredential) (*DatabricksCredential, error)

func (*Client) UpdateEnvironment

func (c *Client) UpdateEnvironment(projectId int, environmentId int, environment Environment) (*Environment, error)

func (*Client) UpdateEnvironmentVariable

func (c *Client) UpdateEnvironmentVariable(projectID int, environmentVariable EnvironmentVariable) (*EnvironmentVariable, error)

func (*Client) UpdateExtendedAttributes added in v0.2.9

func (c *Client) UpdateExtendedAttributes(projectId int, extendedAttributesID int, extendedAttributes ExtendedAttributes) (*ExtendedAttributes, error)

func (*Client) UpdateGroup

func (c *Client) UpdateGroup(groupID int, group Group) (*Group, error)

func (*Client) UpdateGroupPermissions

func (c *Client) UpdateGroupPermissions(groupID int, groupPermissions []GroupPermission) (*[]GroupPermission, error)

func (*Client) UpdateJob

func (c *Client) UpdateJob(jobId string, job Job) (*Job, error)

func (*Client) UpdateLicenseMap added in v0.2.6

func (c *Client) UpdateLicenseMap(licenseMapID int, licenseMap LicenseMap) (*LicenseMap, error)

func (*Client) UpdateNotification added in v0.2.3

func (c *Client) UpdateNotification(notificationId string, notification Notification) (*Notification, error)

func (*Client) UpdatePostgresCredential

func (c *Client) UpdatePostgresCredential(projectId int, credentialId int, postgresCredential PostgresCredential) (*PostgresCredential, error)

UpdatePostgresCredential updates an existing Postgres credential

func (*Client) UpdateProject

func (c *Client) UpdateProject(projectID string, project Project) (*Project, error)

func (*Client) UpdateRepository

func (c *Client) UpdateRepository(repositoryID, projectID string, repository Repository) (*Repository, error)

func (*Client) UpdateServiceToken

func (c *Client) UpdateServiceToken(serviceTokenID int, serviceToken ServiceToken) (*ServiceToken, error)

func (*Client) UpdateServiceTokenPermissions

func (c *Client) UpdateServiceTokenPermissions(serviceTokenID int, serviceTokenPermissions []ServiceTokenPermission) (*[]ServiceTokenPermission, error)

func (*Client) UpdateSnowflakeCredential

func (c *Client) UpdateSnowflakeCredential(projectId int, credentialId int, snowflakeCredential SnowflakeCredential) (*SnowflakeCredential, error)

func (*Client) UpdateWebhook

func (c *Client) UpdateWebhook(webhookId string, webhook WebhookWrite) (*WebhookRead, error)

type Connection

type Connection struct {
	ID                      *int              `json:"id,omitempty"`
	AccountID               int               `json:"account_id"`
	ProjectID               int               `json:"project_id"`
	Name                    string            `json:"name"`
	Type                    string            `json:"type"`
	CreatedByID             *int              `json:"created_by_id,omitempty"`
	CreatedByServiceTokenID *int              `json:"created_by_service_token_id,omitempty"`
	State                   int               `json:"state"`
	PrivateLinkEndpointID   string            `json:"private_link_endpoint_id,omitempty"`
	Created_At              *string           `json:"created_at,omitempty"`
	Updated_At              *string           `json:"updated_at,omitempty"`
	Details                 ConnectionDetails `json:"details"`
}

type ConnectionDetails

type ConnectionDetails struct {
	Account                string                       `json:"account,omitempty"`
	Database               string                       `json:"database,omitempty"`
	DBName                 string                       `json:"dbname,omitempty"`
	Warehouse              string                       `json:"warehouse,omitempty"`
	AllowSSO               *bool                        `json:"allow_sso,omitempty"`
	ClientSessionKeepAlive *bool                        `json:"client_session_keep_alive,omitempty"`
	Role                   string                       `json:"role,omitempty"`
	OAuthClientID          string                       `json:"oauth_client_id,omitempty"`
	OAuthClientSecret      string                       `json:"oauth_client_secret,omitempty"`
	Host                   string                       `json:"hostname,omitempty"`
	Port                   int                          `json:"port,omitempty"`
	TunnelEnabled          *bool                        `json:"tunnel_enabled,omitempty"`
	AdapterId              *int                         `json:"adapter_id,omitempty"`
	AdapterDetails         *DatabricksCredentialDetails `json:"connection_details,omitempty"`
}

type ConnectionListResponse

type ConnectionListResponse struct {
	Data   []Connection   `json:"data"`
	Status ResponseStatus `json:"status"`
}

type ConnectionResponse

type ConnectionResponse struct {
	Data   Connection     `json:"data"`
	Status ResponseStatus `json:"status"`
}

type CreateEnvironmentVariableResponse

type CreateEnvironmentVariableResponse struct {
	Data   CreateEnvironmentVariableResponseMessage `json:"data"`
	Status ResponseStatus                           `json:"status"`
}

type CreateEnvironmentVariableResponseMessage

type CreateEnvironmentVariableResponseMessage struct {
	Message        string `json:"message"`
	NewVariableIDs []int  `json:"new_var_ids"`
}

type CurrentUser

type CurrentUser struct {
	User User `json:"user"`
}

type CurrentUserResponse

type CurrentUserResponse struct {
	Data   CurrentUser    `json:"data"`
	Status ResponseStatus `json:"status"`
}

type DatabricksCredential

type DatabricksCredential struct {
	ID                           *int                                   `json:"id"`
	Account_Id                   int                                    `json:"account_id"`
	Project_Id                   int                                    `json:"project_id"`
	Type                         string                                 `json:"type"`
	State                        int                                    `json:"state"`
	Threads                      int                                    `json:"threads"`
	Target_Name                  string                                 `json:"target_name"`
	Adapter_Id                   int                                    `json:"adapter_id"`
	Credential_Details           DatabricksCredentialDetails            `json:"credential_details"`
	UnencryptedCredentialDetails DatabricksUnencryptedCredentialDetails `json:"unencrypted_credential_details"`
}

type DatabricksCredentialDetails

type DatabricksCredentialDetails struct {
	Fields      map[string]DatabricksCredentialField `json:"fields"`
	Field_Order []string                             `json:"field_order"`
}

func GetDatabricksConnectionDetails added in v0.2.2

func GetDatabricksConnectionDetails(hostName string, httpPath string, catalog string) *DatabricksCredentialDetails

type DatabricksCredentialField

type DatabricksCredentialField struct {
	Metadata DatabricksCredentialFieldMetadata `json:"metadata"`
	Value    interface{}                       `json:"value"`
}

Value can actually be a string or an int (for threads)

type DatabricksCredentialFieldMetadata

type DatabricksCredentialFieldMetadata struct {
	Label        string                                      `json:"label"`
	Description  string                                      `json:"description"`
	Field_Type   string                                      `json:"field_type"`
	Encrypt      bool                                        `json:"encrypt"`
	Overrideable bool                                        `json:"overrideable"`
	Validation   DatabricksCredentialFieldMetadataValidation `json:"validation"`
}

type DatabricksCredentialFieldMetadataValidation

type DatabricksCredentialFieldMetadataValidation struct {
	Required bool `json:"required"`
}

type DatabricksCredentialListResponse

type DatabricksCredentialListResponse struct {
	Data   []DatabricksCredential `json:"data"`
	Status ResponseStatus         `json:"status"`
}

type DatabricksCredentialResponse

type DatabricksCredentialResponse struct {
	Data   DatabricksCredential `json:"data"`
	Status ResponseStatus       `json:"status"`
}

type DatabricksUnencryptedCredentialDetails

type DatabricksUnencryptedCredentialDetails struct {
	Catalog    string `json:"catalog"`
	Schema     string `json:"schema"`
	TargetName string `json:"target_name"`
	Threads    int    `json:"threads"`
	Token      string `json:"token,omitempty"`
}

type DeployKey

type DeployKey struct {
	ID        int    `json:"id"`
	AccountID int    `json:"account_id"`
	State     int    `json:"state"`
	PublicKey string `json:"public_key"`
}

type Environment

type Environment struct {
	ID                           *int                 `json:"id,omitempty"`
	State                        int                  `json:"state,omitempty"`
	Account_Id                   int                  `json:"account_id"`
	Project_Id                   int                  `json:"project_id"`
	Credential_Id                *int                 `json:"credentials_id,omitempty"`
	Name                         string               `json:"name"`
	Dbt_Version                  string               `json:"dbt_version"`
	Type                         string               `json:"type"`
	Use_Custom_Branch            bool                 `json:"use_custom_branch"`
	Custom_Branch                *string              `json:"custom_branch"`
	Environment_Id               *int                 `json:"-"`
	Support_Docs                 bool                 `json:"supports_docs"`
	Created_At                   *string              `json:"created_at"`
	Updated_At                   *string              `json:"updated_at"`
	Project                      Project              `json:"project"`
	Jobs                         *string              `json:"jobs"`
	Credentials                  *SnowflakeCredential `json:"credentials"`
	Custom_Environment_Variables *string              `json:"custom_environment_variables"`
	DeploymentType               *string              `json:"deployment_type,omitempty"`
	ExtendedAttributesID         *int                 `json:"extended_attributes_id,omitempty"`
}

type EnvironmentResponse

type EnvironmentResponse struct {
	Data   Environment    `json:"data"`
	Status ResponseStatus `json:"status"`
}

type EnvironmentVariable

type EnvironmentVariable struct {
	Name                  string
	ProjectID             int
	EnvironmentNameValues map[string]string
}

type EnvironmentVariableNameValue

type EnvironmentVariableNameValue struct {
	ID    int    `json:"id,omitempty"`
	Value string `json:"value"`
}

type EnvironmentVariablesGet

type EnvironmentVariablesGet struct {
	Environment []string                                           `json:"environments"`
	Variables   map[string]map[string]EnvironmentVariableNameValue `json:"variables"`
}

type ExtendedAttributes added in v0.2.9

type ExtendedAttributes struct {
	ID                 *int            `json:"id,omitempty"`
	State              int             `json:"state,omitempty"`
	AccountID          int             `json:"account_id"`
	ProjectID          int             `json:"project_id"`
	ExtendedAttributes json.RawMessage `json:"extended_attributes"`
}

type ExtendedAttributesResponse added in v0.2.9

type ExtendedAttributesResponse struct {
	Data   ExtendedAttributes `json:"data"`
	Status ResponseStatus     `json:"status"`
}

type GetEnvironmentVariableResponse

type GetEnvironmentVariableResponse struct {
	Data   EnvironmentVariablesGet `json:"data"`
	Status ResponseStatus          `json:"status"`
}

type Group

type Group struct {
	ID               *int              `json:"id"`
	Name             string            `json:"name"`
	AccountID        int               `json:"account_id"`
	State            int               `json:"state"`
	AssignByDefault  bool              `json:"assign_by_default"`
	SSOMappingGroups []string          `json:"sso_mapping_groups"`
	Permissions      []GroupPermission `json:"group_permissions,omitempty"`
}

type GroupPermission

type GroupPermission struct {
	ID          *int   `json:"id,omitempty"`
	AccountID   int    `json:"account_id"`
	GroupID     int    `json:"group_id"`
	ProjectID   int    `json:"project_id,omitempty"`
	AllProjects bool   `json:"all_projects"`
	State       int    `json:"state,omitempty"`
	Set         string `json:"permission_set,omitempty"`
	Level       string `json:"permission_level,omitempty"`
}

type GroupPermissionListResponse

type GroupPermissionListResponse struct {
	Data   []GroupPermission `json:"data"`
	Status ResponseStatus    `json:"status"`
}

type GroupResponse

type GroupResponse struct {
	Data   Group          `json:"data"`
	Status ResponseStatus `json:"status"`
}

type Job

type Job struct {
	ID                     *int         `json:"id"`
	Account_Id             int          `json:"account_id"`
	Project_Id             int          `json:"project_id"`
	Environment_Id         int          `json:"environment_id"`
	Name                   string       `json:"name"`
	Description            string       `json:"description"`
	Execute_Steps          []string     `json:"execute_steps"`
	Dbt_Version            *string      `json:"dbt_version"`
	Triggers               JobTrigger   `json:"triggers"`
	Settings               JobSettings  `json:"settings"`
	State                  int          `json:"state"`
	Generate_Docs          bool         `json:"generate_docs"`
	Schedule               JobSchedule  `json:"schedule"`
	Run_Generate_Sources   bool         `json:"run_generate_sources"`
	Deferring_Job_Id       *int         `json:"deferring_job_definition_id"`
	DeferringEnvironmentId *int         `json:"deferring_environment_id"`
	Execution              JobExecution `json:"execution"`
	TriggersOnDraftPR      bool         `json:"triggers_on_draft_pr"`
}

type JobExecution

type JobExecution struct {
	Timeout_Seconds int `json:"timeout_seconds"`
}

type JobResponse

type JobResponse struct {
	Data   Job            `json:"data"`
	Status ResponseStatus `json:"status"`
}

type JobSchedule

type JobSchedule struct {
	Cron string       `json:"cron"`
	Date scheduleDate `json:"date"`
	Time scheduleTime `json:"time"`
}

type JobSettings

type JobSettings struct {
	Threads     int    `json:"threads"`
	Target_Name string `json:"target_name"`
}

type JobTrigger

type JobTrigger struct {
	Github_Webhook     bool `json:"github_webhook"`
	Schedule           bool `json:"schedule"`
	Custom_Branch_Only bool `json:"custom_branch_only"`
	GitProviderWebhook bool `json:"git_provider_webhook"`
}

type LicenseMap added in v0.2.6

type LicenseMap struct {
	ID                      *int     `json:"id"`
	LicenseType             string   `json:"license_type"`
	AccountID               int      `json:"account_id"`
	State                   int      `json:"state"`
	SSOLicenseMappingGroups []string `json:"sso_license_mapping_groups"`
}

type LicenseMapResponse added in v0.2.6

type LicenseMapResponse struct {
	Data   LicenseMap     `json:"data"`
	Status ResponseStatus `json:"status"`
}

type Notification added in v0.2.3

type Notification struct {
	Id               *int    `json:"id,omitempty"`
	AccountId        int     `json:"account_id"`
	UserId           int     `json:"user_id"`
	OnCancel         []int   `json:"on_cancel"`
	OnFailure        []int   `json:"on_failure"`
	OnSuccess        []int   `json:"on_success"`
	State            int     `json:"state"`
	NotificationType int     `json:"type"`
	ExternalEmail    *string `json:"external_email"`
}

type NotificationResponse added in v0.2.3

type NotificationResponse struct {
	Data   Notification   `json:"data"`
	Status ResponseStatus `json:"status"`
}

type Permission added in v0.2.4

type Permission struct {
	AccountID int     `json:"account_id"`
	Groups    []Group `json:"groups"`
}

type PostgresCredential

type PostgresCredential struct {
	ID             *int   `json:"id"`
	Account_Id     int    `json:"account_id"`
	Project_Id     int    `json:"project_id"`
	Type           string `json:"type"`
	State          int    `json:"state"`
	Threads        int    `json:"threads"`
	Username       string `json:"username"`
	Default_Schema string `json:"default_schema"`
	Target_Name    string `json:"target_name"`
	Password       string `json:"password,omitempty"`
}

type PostgresCredentialResponse

type PostgresCredentialResponse struct {
	Data   PostgresCredential `json:"data"`
	Status ResponseStatus     `json:"status"`
}

type PrivatelinkEndpoint

type PrivatelinkEndpoint struct {
	Account_Id             int    `json:"account_id"`
	Name                   string `json:"name"`
	Type                   string `json:"type"`
	PrivatelinkEndpointURL string `json:"private_link_endpoint"`
	CIDRRange              string `json:"cidr_range"`
	State                  int    `json:"state"`
	ID                     string `json:"id"`
}

type PrivatelinkEndpointListResponse

type PrivatelinkEndpointListResponse struct {
	Data   []PrivatelinkEndpoint `json:"data"`
	Status ResponseStatus        `json:"status"`
}

type PrivatelinkEndpointResponse

type PrivatelinkEndpointResponse struct {
	Data   PrivatelinkEndpoint `json:"data"`
	Status ResponseStatus      `json:"status"`
}

type Project

type Project struct {
	ID                     *int    `json:"id,omitempty"`
	Name                   string  `json:"name"`
	DbtProjectSubdirectory *string `json:"dbt_project_subdirectory,omitempty"`
	ConnectionID           *int    `json:"connection_id,integer,omitempty"`
	RepositoryID           *int    `json:"repository_id,integer,omitempty"`
	State                  int     `json:"state"`
	AccountID              int     `json:"account_id"`
	FreshnessJobId         *int    `json:"freshness_job_id"`
	DocsJobId              *int    `json:"docs_job_id,"`
}

type ProjectListResponse

type ProjectListResponse struct {
	Data   []Project      `json:"data"`
	Status ResponseStatus `json:"status"`
	Extra  ResponseExtra  `json:"extra"`
}

type ProjectResponse

type ProjectResponse struct {
	Data   Project        `json:"data"`
	Status ResponseStatus `json:"status"`
}

type Repository

type Repository struct {
	ID                      *int      `json:"id,omitempty"`
	AccountID               int       `json:"account_id"`
	ProjectID               int       `json:"project_id"`
	RemoteUrl               string    `json:"remote_url"`
	State                   int       `json:"state"`
	GitCloneStrategy        string    `json:"git_clone_strategy"`
	RepositoryCredentialsID *int      `json:"repository_credentials_id"`
	GitlabProjectID         *int      `json:"gitlab_project_id"`
	GithubInstallationID    *int      `json:"github_installation_id"`
	DeployKey               DeployKey `json:"deploy_key,omitempty"`
}

type RepositoryListResponse

type RepositoryListResponse struct {
	Data   []Repository   `json:"data"`
	Status ResponseStatus `json:"status"`
}

type RepositoryResponse

type RepositoryResponse struct {
	Data   Repository     `json:"data"`
	Status ResponseStatus `json:"status"`
}

type ResponseExtra added in v0.2.10

type ResponseExtra struct {
	Pagination ResponseExtraPagination `json:"pagination"`
	Filters    ResponseExtraFilters    `json:"filters"`
}

type ResponseExtraFilters added in v0.2.10

type ResponseExtraFilters struct {
	Limit  int `json:"limit"`
	Offset int `json:"offset"`
}

type ResponseExtraPagination added in v0.2.10

type ResponseExtraPagination struct {
	Count      int `json:"count"`
	TotalCount int `json:"total_count"`
}

type ResponseStatus

type ResponseStatus struct {
	Code              int    `json:"code"`
	Is_Success        bool   `json:"is_success"`
	User_Message      string `json:"user_message"`
	Developer_Message string `json:"developer_message"`
}

type ServiceToken

type ServiceToken struct {
	ID          *int                     `json:"id"`
	AccountID   int                      `json:"account_id"`
	UID         string                   `json:"uid"`
	Name        string                   `json:"name"`
	TokenString *string                  `json:"token_string,omitempty"`
	State       int                      `json:"state"`
	Permissions []ServiceTokenPermission `json:"service_token_permissions,omitempty"`
}

type ServiceTokenListResponse

type ServiceTokenListResponse struct {
	Data   []ServiceToken `json:"data"`
	Status ResponseStatus `json:"status"`
}

type ServiceTokenPermission

type ServiceTokenPermission struct {
	ID             *int   `json:"id,omitempty"`
	AccountID      int    `json:"account_id"`
	ServiceTokenID int    `json:"service_token_id"`
	ProjectID      int    `json:"project_id,omitempty"`
	AllProjects    bool   `json:"all_projects"`
	State          int    `json:"state,omitempty"`
	Set            string `json:"permission_set,omitempty"`
}

type ServiceTokenPermissionListResponse

type ServiceTokenPermissionListResponse struct {
	Data   []ServiceTokenPermission `json:"data"`
	Status ResponseStatus           `json:"status"`
}

type ServiceTokenResponse

type ServiceTokenResponse struct {
	Data   ServiceToken   `json:"data"`
	Status ResponseStatus `json:"status"`
}

type SnowflakeCredential

type SnowflakeCredential struct {
	ID                   *int   `json:"id"`
	Account_Id           int    `json:"account_id"`
	Project_Id           int    `json:"project_id"`
	Type                 string `json:"type"`
	State                int    `json:"state"`
	Threads              int    `json:"threads"`
	User                 string `json:"user"`
	Password             string `json:"password,omitempty"`
	Auth_Type            string `json:"auth_type"`
	Database             string `json:"database"`
	Role                 string `json:"role"`
	Warehouse            string `json:"warehouse"`
	Schema               string `json:"schema"`
	PrivateKey           string `json:"private_key,omitempty"`
	PrivateKeyPassphrase string `json:"private_key_passphrase,omitempty"`
}

type SnowflakeCredentialResponse

type SnowflakeCredentialResponse struct {
	Data   SnowflakeCredential `json:"data"`
	Status ResponseStatus      `json:"status"`
}

type User

type User struct {
	ID    int    `json:"id"`
	Email string `json:"email"`
	// only the first permission is filled id, it is a list with  1 element
	Permissions []struct {
		Groups []struct {
			ID int `json:"id"`
		} `json:"groups"`
	} `json:"permissions"`
}

type UserGroups added in v0.2.4

type UserGroups struct {
	Permissions []Permission `json:"permissions"`
}

type UserGroupsBody added in v0.2.4

type UserGroupsBody struct {
	UserID   int   `json:"user_id"`
	GroupIDs []int `json:"desired_group_ids"`
}

type UserGroupsCurrentAccount added in v0.2.4

type UserGroupsCurrentAccount struct {
	Groups []Group
}

type UserGroupsResponse added in v0.2.4

type UserGroupsResponse struct {
	Data   UserGroups     `json:"data"`
	Status ResponseStatus `json:"status"`
}

type UserListResponse

type UserListResponse struct {
	Data   []User         `json:"data"`
	Status ResponseStatus `json:"status"`
	Extra  ResponseExtra  `json:"extra"`
}

type WebhookRead

type WebhookRead struct {
	WebhookId         string   `json:"id"`
	Name              string   `json:"name"`
	Description       string   `json:"description,omitempty"`
	ClientUrl         string   `json:"client_url"`
	EventTypes        []string `json:"event_types,omitempty"`
	JobIds            []string `json:"job_ids,omitempty"`
	Active            bool     `json:"active,omitempty"`
	HmacSecret        *string  `json:"hmac_secret,omitempty"`
	HttpStatusCode    *string  `json:"http_status_code,omitempty"`
	AccountIdentifier *string  `json:"account_identifier,omitempty"`
}

type WebhookResponse

type WebhookResponse struct {
	Data   WebhookRead    `json:"data"`
	Status ResponseStatus `json:"status"`
}

type WebhookWrite

type WebhookWrite struct {
	WebhookId   string   `json:"id"`
	Name        string   `json:"name"`
	Description string   `json:"description,omitempty"`
	ClientUrl   string   `json:"client_url"`
	EventTypes  []string `json:"event_types,omitempty"`
	JobIds      []int    `json:"job_ids,omitempty"`
	Active      bool     `json:"active,omitempty"`
}

Jump to

Keyboard shortcuts

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