helper

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package helper provides the functions to work with SiteHost API.

Index

Constants

View Source
const (
	// JobStatusPending is the status for a pending job.
	JobStatusPending = "Pending"
	// JobStatusCompleted is the status for a completed job.
	JobStatusCompleted = "Completed"
	// JobStatusFailed is the status for a failed job.
	JobStatusFailed = "Failed"
	// JobRequestDelay is the time wait to send a new request to check the job status.
	JobRequestDelay = 10 * time.Second
	// JobRequestTimeout is the time to wait before timeout.
	JobRequestTimeout = 60 * time.Minute
	// JobRequestMinTimeout is the minimum time to wait before refreshes.
	JobRequestMinTimeout = 3 * time.Second
	// JobRequestNotFoundChecks is the number of times to allow not found.
	JobRequestNotFoundChecks = 60
)

Variables

This section is empty.

Functions

func WaitForAction

func WaitForAction(client *api.Client, jobID string) error

WaitForAction is a function to check the Job status in a refresh function.

Types

type CombinedConfig

type CombinedConfig struct {
	Client *api.Client
	Config *Config
}

CombinedConfig is a struct with API wrapper and the Config.

type Config

type Config struct {
	APIKey           string
	ClientID         string
	APIEndpoint      string
	TerraformVersion string
}

Config is a wrapper to save the configuration connection from terraform.

func (*Config) Client

func (c *Config) Client() (*CombinedConfig, diag.Diagnostics)

Client returns a new CombinedConfig instance.

Jump to

Keyboard shortcuts

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