cloudapinic

package
v6.6.3 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeTo

func DecodeTo(oldValues, newValues []interface{}) ([]ionoscloud.Nic, []ionoscloud.Nic, error)

DecodeTo - receives old and new values as slice of interfaces from schema, decodes and returns nic properties

func GetNicFromSchema

func GetNicFromSchema(d *schema.ResourceData, path string) (ionoscloud.Nic, error)

func NicSetData

func NicSetData(d *schema.ResourceData, nic *ionoscloud.Nic) error

func SetNetworkProperties

func SetNetworkProperties(nic ionoscloud.Nic) map[string]interface{}

Types

type Service

type Service struct {
	Client *ionoscloud.APIClient
	Meta   interface{}
	D      *schema.ResourceData
}

func (*Service) Create

func (fs *Service) Create(ctx context.Context, datacenterID, serverID string, nic ionoscloud.Nic) (*ionoscloud.Nic, *ionoscloud.APIResponse, error)

Create - creates the resource in the backend and waits until it is in an `AVAILABLE` state

func (*Service) Delete

func (fs *Service) Delete(ctx context.Context, datacenterID, serverID, ID string) (*ionoscloud.APIResponse, error)

func (*Service) Get

func (fs *Service) Get(ctx context.Context, datacenterId, serverId, ID string, depth int32) (*ionoscloud.Nic, *ionoscloud.APIResponse, error)

func (*Service) List

func (fs *Service) List(ctx context.Context, datacenterID, serverID string, depth int32) ([]ionoscloud.Nic, error)

func (*Service) Update

func (fs *Service) Update(ctx context.Context, datacenterID, serverID, ID string, nicProperties ionoscloud.NicProperties) (*ionoscloud.Nic, *ionoscloud.APIResponse, error)

Jump to

Keyboard shortcuts

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