provider

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2023 License: MPL-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(version string) func() provider.Provider

func NewBorgRepoDataSource

func NewBorgRepoDataSource() datasource.DataSource

func NewBorgRepoResource

func NewBorgRepoResource() resource.Resource

func NewSshKeyDataSource

func NewSshKeyDataSource() datasource.DataSource

func NewSshKeyResource

func NewSshKeyResource() resource.Resource

Types

type BorgBaseProvider

type BorgBaseProvider struct {
	// contains filtered or unexported fields
}

func (*BorgBaseProvider) Configure

func (*BorgBaseProvider) DataSources

func (p *BorgBaseProvider) DataSources(
	ctx context.Context,
) []func() datasource.DataSource

func (*BorgBaseProvider) Metadata

func (*BorgBaseProvider) Resources

func (p *BorgBaseProvider) Resources(
	ctx context.Context,
) []func() resource.Resource

func (*BorgBaseProvider) Schema

type BorgBaseProviderModel

type BorgBaseProviderModel struct {
	ApiToken types.String `tfsdk:"api_token"`
}

type BorgRepoAddPayload

type BorgRepoAddPayload struct {
	RepoAdded BorgRepoPayload `json:"repoAdded"`
}

type BorgRepoDataSource

type BorgRepoDataSource struct {
	// contains filtered or unexported fields
}

func (*BorgRepoDataSource) Configure

func (*BorgRepoDataSource) Metadata

func (*BorgRepoDataSource) Read

func (*BorgRepoDataSource) Schema

type BorgRepoDeletePayload

type BorgRepoDeletePayload struct {
	Ok bool `json:"ok"`
}

type BorgRepoEditPayload

type BorgRepoEditPayload struct {
	RepoEdited BorgRepoPayload `json:"repoEdited"`
}

type BorgRepoModel

type BorgRepoModel struct {
	AlertDays      types.Int64   `tfsdk:"alert_days"`
	AppendOnly     types.Bool    `tfsdk:"append_only"`
	AppendOnlyKeys types.List    `tfsdk:"append_only_keys"`
	BorgVersion    types.String  `tfsdk:"borg_version"`
	Compaction     types.Object  `tfsdk:"compaction"`
	CreatedAt      types.String  `tfsdk:"created_at"`
	CurrentUsage   types.Float64 `tfsdk:"current_usage"`
	Encryption     types.String  `tfsdk:"encryption"`
	Format         types.String  `tfsdk:"format"`
	FullAccessKeys types.List    `tfsdk:"full_access_keys"`
	Id             types.String  `tfsdk:"id"`
	LastModified   types.String  `tfsdk:"last_modified"`
	Name           types.String  `tfsdk:"name"`
	Quota          types.Int64   `tfsdk:"quota"`
	QuotaEnabled   types.Bool    `tfsdk:"quota_enabled"`
	Region         types.String  `tfsdk:"region"`
	RepoPath       types.String  `tfsdk:"repo_path"`
	RsyncKeys      types.List    `tfsdk:"rsync_keys"`
	Server         types.Object  `tfsdk:"server"`
	SftpEnabled    types.Bool    `tfsdk:"sftp_enabled"`
}

type BorgRepoPayload

type BorgRepoPayload struct {
	Id     string `json:"id"`
	Name   string `json:"name"`
	Server struct {
		Id                 string `json:"id"`
		Hostname           string `json:"hostname"`
		Region             string `json:"region"`
		Public             bool   `json:"public"`
		Location           string `json:"location"`
		FingerprintRsa     string `json:"fingerprintRsa"`
		FingerprintEcdsa   string `json:"fingerprintEcdsa"`
		FingerprintEd25519 string `json:"fingerprintEd25519"`
	} `json:"server"`
	Quota                  int      `json:"quota"`
	QuotaEnabled           bool     `json:"quotaEnabled"`
	AlertDays              int      `json:"alertDays"`
	Region                 string   `json:"region"`
	Format                 string   `json:"format"`
	BorgVersion            string   `json:"borgVersion"`
	ResticVersion          string   `json:"resticVersion"`
	Htpasswd               string   `json:"htpasswd"`
	AppendOnly             bool     `json:"appendOnly"`
	AppendOnlyKeys         []string `json:"appendOnlyKeys"`
	FullAccessKeys         []string `json:"fullAccessKeys"`
	RsyncKeys              []string `json:"rsyncKeys"`
	SftpEnabled            bool     `json:"sftpEnabled"`
	Encryption             string   `json:"encryption"`
	CreatedAt              string   `json:"createdAt"`
	LastModified           string   `json:"lastModified"`
	CompactionEnabled      bool     `json:"compactionEnabled"`
	CompactionInterval     int      `json:"compactionInterval"`
	CompactionIntervalUnit string   `json:"compactionIntervalUnit"`
	CompactionHour         int      `json:"compactionHour"`
	CompactionHourTimezone string   `json:"compactionHourTimezone"`
	RepoPath               string   `json:"repoPath"`
	CurrentUsage           float64  `json:"currentUsage"`
}

type BorgRepoResource

type BorgRepoResource struct {
	// contains filtered or unexported fields
}

func (*BorgRepoResource) Configure

func (*BorgRepoResource) Create

func (*BorgRepoResource) Delete

func (*BorgRepoResource) ImportState

func (*BorgRepoResource) Metadata

func (*BorgRepoResource) Read

func (*BorgRepoResource) Schema

func (*BorgRepoResource) Update

type BorgReposPayload

type BorgReposPayload []BorgRepoPayload

type CompactionModel

type CompactionModel struct {
	Enabled      types.Bool   `tfsdk:"enabled"`
	Hour         types.Int64  `tfsdk:"hour"`
	HourTimezone types.String `tfsdk:"hour_timezone"`
	Interval     types.Int64  `tfsdk:"interval"`
	IntervalUnit types.String `tfsdk:"interval_unit"`
}

type ServerModel

type ServerModel struct {
	FingerprintEcdsa   types.String `tfsdk:"fingerprint_ecdsa"`
	FingerprintEd25519 types.String `tfsdk:"fingerprint_ed25519"`
	FingerprintRsa     types.String `tfsdk:"fingerprint_rsa"`
	Hostname           types.String `tfsdk:"hostname"`
	Id                 types.String `tfsdk:"id"`
	Location           types.String `tfsdk:"location"`
	Public             types.Bool   `tfsdk:"public"`
	Region             types.String `tfsdk:"region"`
}

type SshAddPayload

type SshAddPayload struct {
	KeyAdded SshKeyPayload `json:"keyAdded"`
}

type SshDeletePayload

type SshDeletePayload struct {
	Ok bool `json:"ok"`
}

type SshKeyDataSource

type SshKeyDataSource struct {
	// contains filtered or unexported fields
}

func (*SshKeyDataSource) Configure

func (*SshKeyDataSource) Metadata

func (*SshKeyDataSource) Read

func (*SshKeyDataSource) Schema

type SshKeyModel

type SshKeyModel struct {
	AddedAt    types.String `tfsdk:"added_at"`
	Bits       types.Int64  `tfsdk:"bits"`
	HashMd5    types.String `tfsdk:"hash_md5"`
	HashSha256 types.String `tfsdk:"hash_sha256"`
	Id         types.String `tfsdk:"id"`
	LastUsedAt types.String `tfsdk:"last_used_at"`
	Name       types.String `tfsdk:"name"`
	PublicKey  types.String `tfsdk:"public_key"`
	Type       types.String `tfsdk:"type"`
}

type SshKeyPayload

type SshKeyPayload struct {
	AddedAt    string `json:"addedAt"`
	Bits       int    `json:"bits"`
	HashMd5    string `json:"hashMd5"`
	HashSha256 string `json:"hashSha256"`
	Id         string `json:"id"`
	LastUsedAt string `json:"lastUsedAt"`
	Name       string `json:"name"`
	KeyData    string `json:"keyData"`
	KeyType    string `json:"keyType"`
	Comment    string `json:"comment"`
}

type SshKeyResource

type SshKeyResource struct {
	// contains filtered or unexported fields
}

func (*SshKeyResource) Configure

func (*SshKeyResource) Create

func (*SshKeyResource) Delete

func (*SshKeyResource) ImportState

func (*SshKeyResource) Metadata

func (*SshKeyResource) Read

func (*SshKeyResource) Schema

func (*SshKeyResource) Update

type SshKeysPayload

type SshKeysPayload []SshKeyPayload

Jump to

Keyboard shortcuts

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