provider

package module
v0.0.0-...-ae192dd Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const Name string = "turso"

Variables

View Source
var Version string

Version is initialized by the Go linker to contain the semver of this build.

Functions

func Provider

func Provider() p.Provider

func UnwrapOrZero

func UnwrapOrZero[VP *V, V any](v VP) V

UnwrapOrZero unwraps a value when not nil or returns the zero value.

func Zero

func Zero[T any]() T

Zero returns the zero value of a type.

Types

type Config

type Config struct {
	APIToken         *string `pulumi:"apiToken,optional"`
	OrganizationName string  `pulumi:"organization,optional"`
	// contains filtered or unexported fields
}

Provider-level configuration for the Turso provider.

func (*Config) Configure

func (config *Config) Configure(ctx context.Context) error

type Database

type Database struct{}

func (Database) Create

func (Database) Create(ctx context.Context, name string, input DatabaseArgs, preview bool) (string, DatabaseState, error)

func (Database) Delete

func (Database) Delete(ctx context.Context, id string, props DatabaseState) error

func (Database) Diff

func (Database) Read

func (Database) Read(ctx context.Context, id string, inputs DatabaseArgs, state DatabaseState) (canonicalID string, normalizedInputs DatabaseArgs, normalizedState DatabaseState, err error)

func (Database) Update

func (Database) Update(ctx context.Context, id string, olds DatabaseState, news DatabaseArgs, preview bool) (DatabaseState, error)

type DatabaseArgs

type DatabaseArgs struct {
	Group       string            `pulumi:"group"`
	Name        string            `pulumi:"name"`
	AllowAttach *bool             `pulumi:"allowAttach,optional"`
	BlockReads  *bool             `pulumi:"blockReads,optional"`
	BlockWrites *bool             `pulumi:"blockWrites,optional"`
	SizeLimit   *string           `pulumi:"sizeLimit,optional"`
	IsSchema    *bool             `pulumi:"isSchema,optional"`
	Schema      *string           `pulumi:"schema,optional"`
	Seed        *DatabaseSeedArgs `pulumi:"seed,optional"`
}

type DatabaseInstanceState

type DatabaseInstanceState struct {
	Hostname string `pulumi:"hostname" json:"hostname"`
	Name     string `pulumi:"name" json:"name"`
	Region   string `pulumi:"region" json:"region"`
	Type     string `pulumi:"type" json:"type"`
	UUID     string `pulumi:"uuid" json:"uuid"`
}

type DatabaseSeedArgs

type DatabaseSeedArgs struct {
	Type      DatabaseSeedType `pulumi:"type"`
	Name      *string          `pulumi:"name,optional"`
	Timestamp *time.Time       `pulumi:"timestamp,optional"`
	URL       *string          `pulumi:"url,optional"`
}

type DatabaseSeedType

type DatabaseSeedType string
const (
	DatabaseSeedTypeDatabase DatabaseSeedType = "database"
	DatabaseSeedTypeDump     DatabaseSeedType = "dump"
)

func (*DatabaseSeedType) Values

type DatabaseState

type DatabaseState struct {
	AllowAttach   bool     `pulumi:"allowAttach" json:"allow_attach"`
	Archived      bool     `pulumi:"archived" json:"archived"`
	BlockReads    bool     `pulumi:"blockReads" json:"block_reads"`
	BlockWrites   bool     `pulumi:"blockWrites" json:"block_writes"`
	DbId          string   `pulumi:"dbId" json:"db_id"`
	Group         string   `pulumi:"group" json:"group"`
	Hostname      string   `pulumi:"hostname" json:"hostname"`
	IsSchema      bool     `pulumi:"isSchema" json:"is_schema"`
	Name          string   `pulumi:"name" json:"name"`
	PrimaryRegion string   `pulumi:"primaryRegion" json:"primary_region"`
	Regions       []string `pulumi:"regions" json:"regions"`
	Schema        string   `pulumi:"schema" json:"schema"`
	SizeLimit     string   `pulumi:"sizeLimit" json:"size_limit"`
	Type          string   `pulumi:"type" json:"type"`
	Version       string   `pulumi:"version" json:"version"`

	Instances map[string]DatabaseInstanceState `pulumi:"instances" json:"instances"`
}

type DatabaseToken

type DatabaseToken struct{}

func (DatabaseToken) Create

func (DatabaseToken) Diff

func (DatabaseToken) Read

func (DatabaseToken) Read(ctx context.Context, id string, inputs DatabaseTokenArgs, state DatabaseTokenState) (canonicalID string, normalizedInputs DatabaseTokenArgs, normalizedState DatabaseTokenState, err error)

type DatabaseTokenArgs

type DatabaseTokenArgs struct {
	Database      string                      `pulumi:"database"`
	Authorization *DatabaseTokenAuthorization `pulumi:"authorization,optional"`
	ReadAttach    []string                    `pulumi:"readAttach,optional"`
	Expiration    *string                     `pulumi:"expiration,optional"`
}

type DatabaseTokenAuthorization

type DatabaseTokenAuthorization tursoclient.CreateDatabaseTokenAuthorization

func (*DatabaseTokenAuthorization) Values

type DatabaseTokenState

type DatabaseTokenState struct {
	DatabaseTokenArgs
	Token     string `pulumi:"token" json:"jwt" provider:"secret"`
	ExpiresAt string `pulumi:"expiresAt,optional" json:"expiresAt,omitempty"`
}

type Group

type Group struct{}

func (Group) Create

func (Group) Create(ctx context.Context, name string, input GroupArgs, preview bool) (string, GroupState, error)

func (Group) Delete

func (Group) Delete(ctx context.Context, id string, props GroupState) error

func (Group) Diff

func (Group) Diff(ctx context.Context, id string, olds GroupState, news GroupArgs) (p.DiffResponse, error)

func (Group) Read

func (Group) Read(ctx context.Context, id string, inputs GroupArgs, state GroupState) (canonicalID string, normalizedInputs GroupArgs, normalizedState GroupState, err error)

func (Group) Update

func (Group) Update(ctx context.Context, id string, olds GroupState, news GroupArgs, preview bool) (GroupState, error)

type GroupArgs

type GroupArgs struct {
	Name             string   `pulumi:"name"`
	PrimaryLocation  string   `pulumi:"primaryLocation"`
	ReplicaLocations []string `pulumi:"replicaLocations,optional"`
	Extensions       []string `pulumi:"extensions,optional"`
}

type GroupState

type GroupState struct {
	Archived  bool     `pulumi:"archived" json:"archived"`
	Locations []string `pulumi:"locations" json:"locations"`
	Name      string   `pulumi:"name" json:"name"`
	Primary   string   `pulumi:"primary" json:"primary"`
	UUID      string   `pulumi:"uuid" json:"uuid"`
	Version   string   `pulumi:"version" json:"version"`
}

type GroupToken

type GroupToken struct{}

func (GroupToken) Create

func (GroupToken) Create(ctx context.Context, name string, input GroupTokenArgs, preview bool) (string, GroupTokenState, error)

func (GroupToken) Diff

func (GroupToken) Read

func (GroupToken) Read(ctx context.Context, id string, inputs GroupTokenArgs, state GroupTokenState) (canonicalID string, normalizedInputs GroupTokenArgs, normalizedState GroupTokenState, err error)

type GroupTokenArgs

type GroupTokenArgs struct {
	Group         string                   `pulumi:"database"`
	Authorization *GroupTokenAuthorization `pulumi:"authorization,optional"`
	ReadAttach    []string                 `pulumi:"readAttach,optional"`
	Expiration    *string                  `pulumi:"expiration,optional"`
}

type GroupTokenAuthorization

type GroupTokenAuthorization tursoclient.CreateGroupTokenAuthorization

func (*GroupTokenAuthorization) Values

type GroupTokenState

type GroupTokenState struct {
	GroupTokenArgs
	Token     string `pulumi:"token" json:"jwt" provider:"secret"`
	ExpiresAt string `pulumi:"expiresAt,optional" json:"expiresAt,omitempty"`
}

Directories

Path Synopsis
cmd
internal
tursoclient
Code generated by ogen, DO NOT EDIT.
Code generated by ogen, DO NOT EDIT.

Jump to

Keyboard shortcuts

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