oracle

package
v0.0.0-...-f090fa9 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2018 License: Apache-2.0 Imports: 24 Imported by: 0

README

Oracle Provider

This provides Oracle Cloud Infrastructure (OCI) signing support for the FN golang SDK

Configuration:

The provider can read most of it's settings from OCI configuration file: (~/.oci/config)

Key Example Required Read from ~/.oci/config Description
api-url https://api.faas.us-ashburn-1.oraclecloud.com/ Yes No The API endpoint to contact for accessing the service API
call-url https://r.faas.us-ashburn-1.oraclecloud.com/ Yes (If calls are being made) No The call endpoint base URL for calling functions
oracle.compartment-id ocid1.compartment.oc1..aaaaaaaajvunnz..... Yes No The compartment OCID for the functions tenancy - this corresponds to where you want functions objects to exist in OCI
oracle.tenancy-id ocid1.tenancy.oc1..aaaaaaaai4w6iipzc73k3s2.... No The tenancy of the user accessing the service
oracle.user-id ocid1.user.oc1..aaaaaaaay2df7zq4lgv7.... No Yes The OCID of the user accessing the API
oracle.fingerprint 30:c1:f8:98:38:be:bb... No Yes The RSA key fingerprint of the key being used
oracle.key-file /home/myuser/.oci/private_key.pem No Yes (key_file) The private key for the registered API key
oracle.pass-phrase No Yes (pass_phrase )
oracle.profile No No Defaults to DEFAULT - the OCI Configuration profile to use for reading OCI information
oracle.disable-certs true No No Ignore SSL host name checks when contacting the server (should only be used for diagnosis and testing)

Documentation

Index

Constants

View Source
const (
	CfgTenancyID     = "oracle.tenancy-id"
	CfgUserID        = "oracle.user-id"
	CfgFingerprint   = "oracle.fingerprint"
	CfgKeyFile       = "oracle.key-file"
	CfgPassPhrase    = "oracle.pass-phrase"
	CfgProfile       = "oracle.profile"
	CfgCompartmentID = "oracle.compartment-id"
	CfgDisableCerts  = "oracle.disable-certs"
)

Variables

This section is empty.

Functions

func InsecureRoundTripper

func InsecureRoundTripper(roundTripper http.RoundTripper) http.RoundTripper

Skip verification of insecure certs

func NewFromConfig

func NewFromConfig(configSource provider.ConfigSource, passphraseSource provider.PassPhraseSource) (provider.Provider, error)

Types

type Annotations

type Annotations struct {
	CompartmentID string `json:"oracle.com/oci/compartmentId"`
	ShortCode     string `json:"oracle.com/oci/appCode"`
}

type Provider

type Provider struct {
	// FnApiUrl is the endpoint to use for API interactions
	FnApiUrl *url.URL
	// FnCallUrl is the endpoint used for call interactions
	FnCallUrl *url.URL
	// KeyId is the public key fingerprint (in colon-separated hex) of the public key used for interactions
	KeyId string
	// PrivateKey is the RSA private key used to sign requests
	PrivateKey *rsa.PrivateKey
	//DisableCerts indicates if server certificates should be ignored
	DisableCerts bool
	//CompartmentID is the ocid of the functions compartment ID for a given function
	CompartmentID string
}

Provider : Oracle Authentication provider

func (*Provider) APIClient

func (op *Provider) APIClient() *fnclient.Fn

func (*Provider) APIClientv2

func (op *Provider) APIClientv2() *clientv2.Fn

func (*Provider) APIURL

func (op *Provider) APIURL() *url.URL

func (*Provider) CallURL

func (op *Provider) CallURL(appName string) (*url.URL, error)

func (*Provider) VersionClient

func (op *Provider) VersionClient() *version.Client

func (*Provider) WrapCallTransport

func (op *Provider) WrapCallTransport(roundTripper http.RoundTripper) http.RoundTripper

type Response

type Response struct {
	Annotations Annotations `json:"annotations"`
	CreatedAt   string      `json:"created_at"`
	UpdatedAt   string      `json:"updated_at"`
	Name        string      `json:"name"`
}

Jump to

Keyboard shortcuts

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