crn

package
v0.6.9 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ServiceBluemix = "bluemix"
	ServiceIAM     = "iam"
	// ServiceCF is the service name for public Cloudfoundry
	ServiceCF = "cf"
	// ServiceCFEE is the service name for CFEE Cloudfoundry
	ServiceCFEE = "cfaas"

	ScopeAccount      = "a"
	ScopeOrganization = "o"
	ScopeSpace        = "s"
	ScopeProject      = "p"

	ResourceTypeCFSpace    = "cf-space"
	ResourceTypeCFApp      = "cf-application"
	ResourceTypeCFService  = "cf-service-instance"
	ResourceTypeRole       = "role"
	ResourceTypeDeployment = "deployment"
)

Variables

View Source
var (
	ErrMalformedCRN   = errors.New("malformed CRN")
	ErrMalformedScope = errors.New("malformed scope in CRN")
)

Functions

This section is empty.

Types

type CRN

type CRN struct {
	Scheme          string
	Version         string
	CName           string
	CType           string
	ServiceName     string
	Region          string
	ScopeType       string
	Scope           string
	ServiceInstance string
	ResourceType    string
	Resource        string
}

func New

func New(cloudName string, cloudType string) CRN

func Parse

func Parse(s string) (CRN, error)

func (CRN) MarshalJSON

func (c CRN) MarshalJSON() ([]byte, error)

func (CRN) ScopeSegment

func (c CRN) ScopeSegment() string

func (CRN) String

func (c CRN) String() string

func (*CRN) UnmarshalJSON

func (c *CRN) UnmarshalJSON(b []byte) error

Jump to

Keyboard shortcuts

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