opc

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2020 License: MPL-2.0 Imports: 7 Imported by: 39

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Int added in v0.1.1

func Int(v int) *int

Int returns a pointer to an int

func LogOutput

func LogOutput() (logOutput io.Writer, err error)

LogOutput outputs the requested messages

func String

func String(v string) *string

String returns a pointer to a string

Types

type Config

type Config struct {
	Username       *string
	Password       *string
	IdentityDomain *string
	APIEndpoint    *url.URL
	MaxRetries     *int
	LogLevel       LogLevelType
	Logger         Logger
	HTTPClient     *http.Client
	UserAgent      *string
}

Config details the parameters needed to authenticate with Oracle Clouds API

func NewConfig

func NewConfig() *Config

NewConfig returns a blank config to populate with the neccessary fields to authenitcate with Oracle's API

type LogLevelType

type LogLevelType uint

LogLevelType details the constants that log level can be in

const (
	// LogOff turns logging off
	LogOff LogLevelType = 0
	// LogDebug turns logging to debug
	LogDebug LogLevelType = 1
)

func LogLevel

func LogLevel() LogLevelType

LogLevel gets current Log Level from the ORACLE_LOG env var

type Logger

type Logger interface {
	Log(...interface{})
}

Logger interface. Should be satisfied by Terraform's logger as well as the Default logger

func NewDefaultLogger

func NewDefaultLogger() Logger

NewDefaultLogger returns a default logger if one isn't specified during configuration

type LoggerFunc

type LoggerFunc func(...interface{})

LoggerFunc details the logger functions

func (LoggerFunc) Log

func (f LoggerFunc) Log(args ...interface{})

Log logs the specified messages

type OracleError

type OracleError struct {
	StatusCode int
	Message    string
}

OracleError details the parameters of an error returned from Oracle's API

func (OracleError) Error

func (e OracleError) Error() string

Jump to

Keyboard shortcuts

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