oci

package
v0.0.0-...-6ac2e72 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ShortName   = "oci"
	FullName    = "Oracle Cloud Infrastructure"
	HostType    = "hosting"
	SourceURL   = "https://docs.oracle.com/en-us/iaas/Content/General/Concepts/addressranges.htm"
	DownloadURL = "https://docs.oracle.com/iaas/tools/public_ip_ranges.json"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CIDR

type CIDR struct {
	CIDR netip.Prefix `json:"cidr"`
	Tags []string     `json:"tags"`
}

type Doc

type Doc struct {
	LastUpdatedTimestamp time.Time
	Regions              []Region
}

func (*Doc) UnmarshalJSON

func (doc *Doc) UnmarshalJSON(p []byte) error

type OCI

type OCI struct {
	Client      *retryablehttp.Client
	DownloadURL string
}

func New

func New() OCI

func (*OCI) Fetch

func (ora *OCI) Fetch() (doc Doc, err error)

func (*OCI) FetchData

func (ora *OCI) FetchData() (data []byte, headers http.Header, status int, err error)

type RawCIDR

type RawCIDR struct {
	CIDR string   `json:"cidr"`
	Tags []string `json:"tags"`
}

type RawDoc

type RawDoc struct {
	LastUpdatedTimestamp string      `json:"last_updated_timestamp"`
	RawRegions           []RawRegion `json:"regions"`
}

type RawRegion

type RawRegion struct {
	Region string    `json:"region"`
	CIDRS  []RawCIDR `json:"cidrs"`
	Tags   []string  `json:"tags"`
}

type Region

type Region struct {
	Region string `json:"region"`
	CIDRS  []CIDR `json:"cidrs"`
}

Jump to

Keyboard shortcuts

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