common

package
v0.0.0-...-95ad2a0 Latest Latest
Warning

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

Go to latest
Published: May 10, 2017 License: LGPL-3.0 Imports: 3 Imported by: 8

Documentation

Index

Constants

View Source
const (
	AdminDistanceZero = 0
	AdminDistanceOne  = 1
	AdminDistanceTwo  = 2
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AdminDistance

type AdminDistance int

type BackupState

type BackupState string

BackupState represents current state of the backup

const (
	Submitted       BackupState = "SUBMITTED"
	Inprogress      BackupState = "INPROGRESS"
	Completed       BackupState = "COMPLETED"
	Failed          BackupState = "FAILED"
	Canceling       BackupState = "CANCELLING"
	Canceled        BackupState = "CANCELED"
	Timeout         BackupState = "TIMEOUT"
	DeleteSubmitted BackupState = "DELETE_SUBMITTED"
	Deleting        BackupState = "DELETING"
	Deleted         BackupState = "DELETED"
)

Lists of backup states

type FlowDirection

type FlowDirection string
const (
	Egress  FlowDirection = "egress"
	Ingress FlowDirection = "ingress"
)

type Hour

type Hour struct {
	// HourlyInterval number of backups
	HourlyInterval int `json:"hourlyInterval,omitempty"`
}

Hour represents the how many backup should be performed

type IPPool

type IPPool string

IPPool type describing the parent pool of an ip association

const (
	// PublicIPPool standard ip pool for the oracle provider
	PublicIPPool IPPool = "/oracle/public/ippool"
)

func NewIPPool

func NewIPPool(name IPPool, prefix IPPrefixType) IPPool

type IPPrefixType

type IPPrefixType string
const (
	IPReservationType IPPrefixType = "ipreservation:"
	IPPoolType        IPPrefixType = "ippool:"
)

type IcmpCode

type IcmpCode string

IcmpCode is the ICMP code for sec application

const (
	IcmpCodeNetwork  IcmpCode = "network"
	IcmpCodeHost     IcmpCode = "host"
	IcmpCodeProtocol IcmpCode = "protocol"
	IcmpCodePort     IcmpCode = "port"
	IcmpCodeDf       IcmpCode = "df"
	IcmpCodeAdmin    IcmpCode = "admin"
)

type IcmpType

type IcmpType string

IcmpType is the icmp type for sec application

const (
	IcmpTypeEcho       IcmpType = "echo"
	IcmpTypeReply      IcmpType = "reply"
	IcmpTypeTTL        IcmpType = "ttl"
	IcmpTypeTraceroute IcmpType = "traceroute"
	IcmpUnreachable    IcmpType = "unreachable"
)

type Index

type Index int

Index is an index storage number that is in the range of 1-10 this index determines the device name by which the volume is exposed to the instance

func (Index) Validate

func (i Index) Validate() (err error)

Validate validates the index provided if it's compliant with the oracle cloud storage index system

type InstanceState

type InstanceState string
const (
	StateQueued       InstanceState = "queued"
	StatePreparing    InstanceState = "preparing"
	StateInitializing InstanceState = "initializing"
	StateStarting     InstanceState = "starting"
	StateRunning      InstanceState = "running"
	StateSuspending   InstanceState = "suspending"
	StateSuspended    InstanceState = "suspended"
	StateStopping     InstanceState = "stopping"
	StateStopped      InstanceState = "stopped"
	StateUnreachable  InstanceState = "unreachable"
	StateError        InstanceState = "error"
)

type Interval

type Interval struct {
	// Hourly is the count of backups in a hour
	Hourly Hour `json:"Hourly,omitempty"`
	// DaysOfWeek what are the days the backup should run
	DaysOfWeek []Week `json:"DaysOfWeek,omitempty"`
	// TimeOfDay is the time of the day that the backup should run
	TimeOfDay string `json:"timeOfDay,omitempty"`
	// UserTimeZone the user timezone
	// The user timezone is IANA user timezone
	UserTimeZone string `json:"userTimeZone,omitempty"`
}

Interval type used for providing an Interval in the BackupCOnfigurationParams

func NewDailyWeekly

func NewDailyWeekly(
	days []Week,
	time string,
	timezone string,
) Interval

NewDaylyWeekly returns a new DaylyWeekly used for constructing the interval in the backup configuration params

func NewInterval

func NewInterval(hourlyInterval int) Interval

NewInterval returns a new Interval used for constructing the interval in the backup configuration params

func (Interval) Validate

func (i Interval) Validate() (err error)

Validate will validate the interval in the backup configuration params

type Networking

type Networking map[string]Nic

Networking is a json object of string keys Every key is the name of the interface example eth0,eth1, etc. And every value is a predefined json objects that holds information about the interface

type Nic

type Nic struct {
	// Dns is the dns of the nic
	Dns []string `json:"dns,omitempty"`

	// Model is the model that has this nic attached
	Model string `json:"model,omitempty"`

	// Nat indicates whether a temporary or permanent
	// public IP address should be assigned
	// to the instance
	Nat string `json:"nat,omitempty"`

	// Seclits is the security lists that you want to add the instance
	Seclists []string `json:"seclists,omitempty"`

	// Vethernet is present if the nic is a vethernet type
	Vethernet string `json:"vethernet,omitempty"`

	// Vnic is present if the nic is a Vnic type
	Vnic string `json:"vnic,omitempty"`

	Ipnetwork string `json:"ipnetwork,omitempty"`
}

Nic type used to hold information from a given interface card This wil be used to dump all information from the Networking type above

func (Nic) GetType

func (n Nic) GetType() NicType

type NicType

type NicType string

NicType type representing the type of networking card we are dealing with a vethernet type or a vnic type

const (
	// Vnic is the networking virtual nic type
	VNic NicType = "vnic"
	// VEthernet is the virtual ethernet type
	VEthernet NicType = "vethernet"
)

type Protocol

type Protocol string

Protocol is the protocol for sec application

const (
	TCP    Protocol = "6"
	ICMP   Protocol = "1"
	IGMP   Protocol = "2"
	IPIP   Protocol = "94"
	RDP    Protocol = "27"
	ESP    Protocol = "50"
	AH     Protocol = "51"
	GRE    Protocol = "47"
	ICMPV6 Protocol = "58"
	OSPF   Protocol = "89"
	PIM    Protocol = "103"
	SCTP   Protocol = "132"
	MPLSIP Protocol = "137"
)

func (Protocol) Validate

func (p Protocol) Validate() (err error)

type SecRuleAction

type SecRuleAction string
const (
	SecRulePermit SecRuleAction = "PERMIT"
	SecRuleDeny   SecRuleAction = "DENY"
)

func (SecRuleAction) Validate

func (s SecRuleAction) Validate() (err error)

type StateStorage

type StateStorage string

StateStorage type that holds the state of the storage in motion

const (
	// StateAttaching describes the storage attachment is in
	// the process of attaching to the instance.
	StateAttaching StateStorage = "attaching"

	// StateAttached describes the storage attachment is
	// attached to the instance.
	StateAttached StateStorage = "attached"

	// StateDetached describes the storage attachment is
	// in the process of detaching from the instance.
	StateDetached StateStorage = "detached"

	// StateUnavailable tells that the storage attachment is unavailable.
	StateUnavailable StateStorage = "unavailable"

	//StateUnknown descibes the state of the storage attachment is not known.
	StateUnknown StateStorage = "unknown"
)

type StoragePool

type StoragePool string

StoragePool type holds properties for storage volumes

const (
	// LatencyPool is the for storage volumes that require low latency and high IOPS
	LatencyPool StoragePool = "/oracle/public/storage/latency"
	// DefaultPool is for all other storage volumes, usually the default one
	DefaultPool StoragePool = "/oracle/public/storage/default"
)

func (StoragePool) Validate

func (s StoragePool) Validate() (err error)

validate used in validating the storage pool

type StorageSize

type StorageSize string

func NewStorageSize

func NewStorageSize(n uint64, of StorageSizeType) StorageSize

NewStorageSize returns a new storage size compliant with the oracle storgae spec

type StorageSizeType

type StorageSizeType string
const (
	B StorageSizeType = "B"
	K StorageSizeType = "K"
	M StorageSizeType = "M"
	G StorageSizeType = "G"
	T StorageSizeType = "T"
)

type VcableID

type VcableID string

VcableID is the vcable it of the instance that is associated with the ip reservation.

func (VcableID) Validate

func (v VcableID) Validate() (err error)

Validate checks if the VcableID provided is empty or not

type VolumeState

type VolumeState string
const (
	VolumeInitializint VolumeState = "Initializing"
	VolumeDeleting     VolumeState = "Deleting"
	VolumeOnline       VolumeState = "Online"
	VolumeError        VolumeState = "Error"
)

type Week

type Week string

Week type for using all week days

const (
	Monday    Week = "MONDAY"
	Tuesday   Week = "TUESDAY"
	Wednesday Week = "WEDNESDAY"
	Thursday  Week = "THURSDAY"
	Friday    Week = "FRIDAY"
	Saturday  Week = "SATURDAY"
	Sunday    Week = "SUNDAY"
)

Jump to

Keyboard shortcuts

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