models

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Capabilities

type Capabilities struct {
	Add  types.List `tfsdk:"add"`
	Drop types.List `tfsdk:"drop"`
}

func (Capabilities) AttrType

func (m Capabilities) AttrType() map[string]attr.Type

func (Capabilities) ModelType

func (m Capabilities) ModelType() attr.Type

type ComposeContent

type ComposeContent struct {
	*types.String
}

type ComposeContentBuilder

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

func NewComposeContentBuilder

func NewComposeContentBuilder(ctx context.Context) *ComposeContentBuilder

func (*ComposeContentBuilder) Build

func (c *ComposeContentBuilder) Build(content *string) diag.Diagnostics

func (*ComposeContentBuilder) SetConfigs

func (c *ComposeContentBuilder) SetConfigs(configs *types.Map) *ComposeContentBuilder

func (*ComposeContentBuilder) SetNetworks

func (c *ComposeContentBuilder) SetNetworks(networks *types.Map) *ComposeContentBuilder

func (*ComposeContentBuilder) SetSecrets

func (c *ComposeContentBuilder) SetSecrets(secrets *types.Map) *ComposeContentBuilder

func (*ComposeContentBuilder) SetServices

func (c *ComposeContentBuilder) SetServices(services *types.Map) *ComposeContentBuilder

func (*ComposeContentBuilder) SetVolumes

func (c *ComposeContentBuilder) SetVolumes(volumes *types.Map) *ComposeContentBuilder

type Config

type Config struct {
	Name    types.String `tfsdk:"name"`
	Content types.String `tfsdk:"content"`
	File    types.String `tfsdk:"file"`
}

func (Config) AsComposeConfig

func (m Config) AsComposeConfig(ctx context.Context, config *composetypes.ConfigObjConfig) (d diag.Diagnostics)

func (Config) AttrType

func (m Config) AttrType() map[string]attr.Type

func (*Config) FromComposeConfig

func (m *Config) FromComposeConfig(ctx context.Context, config *composetypes.ConfigObjConfig) (d diag.Diagnostics)

func (Config) ModelType

func (m Config) ModelType() attr.Type

func (Config) Value

func (m Config) Value() attr.Value

type HealthCheck

type HealthCheck struct {
	Test          types.List           `tfsdk:"test"`
	Interval      timetypes.GoDuration `tfsdk:"interval"`
	Timeout       timetypes.GoDuration `tfsdk:"timeout"`
	StartInterval timetypes.GoDuration `tfsdk:"start_interval"`
	StartPeriod   timetypes.GoDuration `tfsdk:"start_period"`
	Retries       types.Number         `tfsdk:"retries"`
}

func (HealthCheck) AttrType

func (m HealthCheck) AttrType() map[string]attr.Type

func (HealthCheck) ModelType

func (m HealthCheck) ModelType() attr.Type

type IPAMConfig

type IPAMConfig struct {
	Driver  types.String `tfsdk:"driver"`
	Configs types.List   `tfsdk:"config"`
}

func (IPAMConfig) AttrType

func (m IPAMConfig) AttrType() map[string]attr.Type

func (IPAMConfig) ModelType

func (m IPAMConfig) ModelType() attr.Type

type IPAMPool

type IPAMPool struct {
	Subnet     types.String `tfsdk:"subnet"`
	Gateway    types.String `tfsdk:"gateway"`
	IPRange    types.String `tfsdk:"ip_range"`
	AuxAddress types.Map    `tfsdk:"aux_addresses"`
}

func (IPAMPool) AttrType

func (m IPAMPool) AttrType() map[string]attr.Type

func (IPAMPool) ModelType

func (m IPAMPool) ModelType() attr.Type

type Logging

type Logging struct {
	Driver  types.String `tfsdk:"driver"`
	Options types.Map    `tfsdk:"options"`
}

func (Logging) AttrType

func (m Logging) AttrType() map[string]attr.Type

func (Logging) ModelType

func (m Logging) ModelType() attr.Type

type Network

type Network struct {
	Name       types.String `tfsdk:"name"`
	Driver     types.String `tfsdk:"driver"`
	DriverOpts types.Map    `tfsdk:"driver_opts"`
	Ipam       types.Object `tfsdk:"ipam"`
	External   types.Bool   `tfsdk:"external"`
	Internal   types.Bool   `tfsdk:"internal"`
	Attachable types.Bool   `tfsdk:"attachable"`
	Labels     types.Map    `tfsdk:"labels"`
	EnableIPv6 types.Bool   `tfsdk:"enable_ipv6"`
}

func (Network) AsComposeConfig

func (m Network) AsComposeConfig(ctx context.Context, network *composetypes.NetworkConfig) (d diag.Diagnostics)

func (Network) AttrType

func (m Network) AttrType() map[string]attr.Type

func (*Network) FromComposeConfig

func (m *Network) FromComposeConfig(ctx context.Context, network *composetypes.NetworkConfig) (d diag.Diagnostics)

func (Network) ModelType

func (m Network) ModelType() attr.Type

type Port

type Port struct {
	Name        types.String `tfsdk:"name"`
	Target      types.Int64  `tfsdk:"target"`
	Published   types.String `tfsdk:"published"`
	Protocol    types.String `tfsdk:"protocol"`
	AppProtocol types.String `tfsdk:"app_protocol"`
	Mode        types.String `tfsdk:"mode"`
	HostIP      types.String `tfsdk:"host_ip"`
}

func (Port) AttrType

func (m Port) AttrType() map[string]attr.Type

func (Port) ModelType

func (m Port) ModelType() attr.Type

type Secret

type Secret struct {
	Name    types.String `tfsdk:"name"`
	Content types.String `tfsdk:"content"`
	File    types.String `tfsdk:"file"`
}

func (Secret) AsComposeConfig

func (m Secret) AsComposeConfig(ctx context.Context, secret *composetypes.SecretConfig) (d diag.Diagnostics)

func (Secret) AttrType

func (m Secret) AttrType() map[string]attr.Type

func (*Secret) FromComposeConfig

func (m *Secret) FromComposeConfig(ctx context.Context, volume *composetypes.SecretConfig) (d diag.Diagnostics)

func (Secret) ModelType

func (m Secret) ModelType() attr.Type

func (Secret) Value

func (m Secret) Value() attr.Value

type Service

type Service struct {
	ContainerName types.String `tfsdk:"container_name"`
	Image         types.String `tfsdk:"image"`
	MemLimit      types.String `tfsdk:"mem_limit"`
	Entrypoint    types.List   `tfsdk:"entrypoint"`
	Command       types.List   `tfsdk:"command"`
	Replicas      types.Int64  `tfsdk:"replicas"`
	Logging       types.Object `tfsdk:"logging"`
	Ports         types.List   `tfsdk:"ports"`
	Networks      types.Map    `tfsdk:"networks"`
	NetworkMode   types.String `tfsdk:"network_mode"`
	HealthCheck   types.Object `tfsdk:"healthcheck"`
	SecurityOpt   types.List   `tfsdk:"security_opt"`
	Volumes       types.List   `tfsdk:"volumes"`
	Dependencies  types.Map    `tfsdk:"depends_on"`
	Privileged    types.Bool   `tfsdk:"privileged"`
	Tmpfs         types.List   `tfsdk:"tmpfs"`
	Ulimits       types.Map    `tfsdk:"ulimits"`
	Environment   types.Map    `tfsdk:"environment"`
	Restart       types.String `tfsdk:"restart"`
	Configs       types.List   `tfsdk:"configs"`
	Secrets       types.List   `tfsdk:"secrets"`
	Labels        types.Map    `tfsdk:"labels"`
	DNS           types.List   `tfsdk:"dns"`
	User          types.String `tfsdk:"user"`
	Capabilities  types.Object `tfsdk:"capabilities"`
	CapAdd        types.List   `tfsdk:"cap_add"`
	CapDrop       types.List   `tfsdk:"cap_drop"`
	Sysctls       types.Map    `tfsdk:"sysctls"`
}

func (Service) AsComposeConfig

func (m Service) AsComposeConfig(ctx context.Context, service *composetypes.ServiceConfig) (d diag.Diagnostics)

func (Service) AttrType

func (m Service) AttrType() map[string]attr.Type

func (*Service) FromComposeConfig

func (m *Service) FromComposeConfig(ctx context.Context, service *composetypes.ServiceConfig) (d diag.Diagnostics)

func (Service) ModelType

func (m Service) ModelType() attr.Type

func (Service) Value

func (m Service) Value() attr.Value

type ServiceConfig

type ServiceConfig struct {
	Source types.String `tfsdk:"source"`
	Target types.String `tfsdk:"target"`
	UID    types.String `tfsdk:"uid"`
	GID    types.String `tfsdk:"gid"`
	Mode   types.String `tfsdk:"mode"`
}

func (ServiceConfig) AttrType

func (m ServiceConfig) AttrType() map[string]attr.Type

func (ServiceConfig) ModelType

func (m ServiceConfig) ModelType() attr.Type

type ServiceDependency

type ServiceDependency struct {
	Condition types.String `tfsdk:"condition"`
	Restart   types.Bool   `tfsdk:"restart"`
}

func (ServiceDependency) AttrType

func (m ServiceDependency) AttrType() map[string]attr.Type

func (ServiceDependency) ModelType

func (m ServiceDependency) ModelType() attr.Type

type ServiceNetwork

type ServiceNetwork struct {
	Name         types.String `tfsdk:"name"`
	Aliases      types.Set    `tfsdk:"aliases"`
	Ipv4Address  types.String `tfsdk:"ipv4_address"`
	Ipv6Address  types.String `tfsdk:"ipv6_address"`
	LinkLocalIPs types.Set    `tfsdk:"link_local_ips"`
	MacAddress   types.String `tfsdk:"mac_address"`
	DriverOpts   types.Map    `tfsdk:"driver_opts"`
	Priority     types.Int64  `tfsdk:"priority"`
}

func (ServiceNetwork) AttrType

func (m ServiceNetwork) AttrType() map[string]attr.Type

func (ServiceNetwork) ModelType

func (m ServiceNetwork) ModelType() attr.Type

func (ServiceNetwork) Value

func (m ServiceNetwork) Value() attr.Value

type ServicePortal

type ServicePortal struct {
	Enable   types.Bool   `tfsdk:"enable"`
	Name     types.String `tfsdk:"name"`
	Port     types.Int64  `tfsdk:"port"`
	Protocol types.String `tfsdk:"protocol"`
}

func (*ServicePortal) First

type ServiceVolume

type ServiceVolume struct {
	Source   types.String `tfsdk:"source"`
	Target   types.String `tfsdk:"target"`
	ReadOnly types.Bool   `tfsdk:"read_only"`
	Bind     types.Object `tfsdk:"bind"`
	Type     types.String `tfsdk:"type"`
}

func (ServiceVolume) AttrType

func (m ServiceVolume) AttrType() map[string]attr.Type

func (ServiceVolume) ModelType

func (m ServiceVolume) ModelType() attr.Type

type Ulimit

type Ulimit struct {
	Value types.Int64 `tfsdk:"single"`
	Soft  types.Int64 `tfsdk:"soft"`
	Hard  types.Int64 `tfsdk:"hard"`
}

func (Ulimit) AttrType

func (m Ulimit) AttrType() map[string]attr.Type

func (Ulimit) ModelType

func (m Ulimit) ModelType() attr.Type

type Volume

type Volume struct {
	Name       types.String `tfsdk:"name"`
	Driver     types.String `tfsdk:"driver"`
	DriverOpts types.Map    `tfsdk:"driver_opts"`
	External   types.Bool   `tfsdk:"external"`
	Labels     types.Map    `tfsdk:"labels"`
}

func (Volume) AsComposeConfig

func (m Volume) AsComposeConfig(ctx context.Context, network *composetypes.VolumeConfig) (d diag.Diagnostics)

func (Volume) AttrType

func (m Volume) AttrType() map[string]attr.Type

func (*Volume) FromComposeConfig

func (m *Volume) FromComposeConfig(ctx context.Context, volume *composetypes.VolumeConfig) (d diag.Diagnostics)

func (Volume) ModelType

func (m Volume) ModelType() attr.Type

type VolumeBind

type VolumeBind struct {
	Propagation    types.String `tfsdk:"propagation"`
	CreateHostPath types.Bool   `tfsdk:"create_host_path"`
	SELinux        types.String `tfsdk:"selinux"`
}

func (VolumeBind) AttrType

func (m VolumeBind) AttrType() map[string]attr.Type

func (VolumeBind) ModelType

func (m VolumeBind) ModelType() attr.Type

Jump to

Keyboard shortcuts

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