go-oracle-cloud: github.com/juju/go-oracle-cloud/common Index | Files

package common

import "github.com/juju/go-oracle-cloud/common"

Index

Package Files

backup.go networking.go security.go status.go storage.go

Constants

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

type AdminDistance Uses

type AdminDistance int

type BackupState Uses

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 Uses

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

type Hour Uses

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

Hour represents the how many backup should be performed

type IPPool Uses

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 Uses

func NewIPPool(name IPPool, prefix IPPrefixType) IPPool

type IPPrefixType Uses

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

type IcmpCode Uses

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 Uses

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 Uses

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 Uses

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

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

type InstanceState Uses

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 Uses

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 Uses

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 Uses

func NewInterval(hourlyInterval int) Interval

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

func (Interval) Validate Uses

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

Validate will validate the interval in the backup configuration params

type Networking Uses

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 Uses

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 Uses

func (n Nic) GetType() NicType

type NicType Uses

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 Uses

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 Uses

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

type SecRuleAction Uses

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

func (SecRuleAction) Validate Uses

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

type StateStorage Uses

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 Uses

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 Uses

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

validate used in validating the storage pool

type StorageSize Uses

type StorageSize string

func NewStorageSize Uses

func NewStorageSize(n uint64, of StorageSizeType) StorageSize

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

type StorageSizeType Uses

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

type VcableID Uses

type VcableID string

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

func (VcableID) Validate Uses

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

Validate checks if the VcableID provided is empty or not

type VolumeState Uses

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

type Week Uses

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"
)

Package common imports 3 packages (graph) and is imported by 15 packages. Updated 2017-04-15. Refresh now. Tools for package owners.