uri

package
v1.3.3-0...-3aec24a Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ResourceURI

type ResourceURI struct {
	// contains filtered or unexported fields
}

ResourceURI describes resource URI

func New

func New(path string) ResourceURI

New creates an instance of ResourceURI

func NewClusterURI

func NewClusterURI(profileName string) ResourceURI

NewClusterURI creates a new cluster URI for given cluster name

func NewGatewayURI

func NewGatewayURI(id string) ResourceURI

NewGatewayURI creates a gateway URI for a given ID

func ParseClusterURI

func ParseClusterURI(path string) (ResourceURI, error)

ParseClusterURI parses a string and returns a cluster URI.

If given a resource URI, it'll return the URI of the cluster to which the resource belongs to. If given a leaf cluster resource URI, it'll return the URI of the leaf cluster.

func (ResourceURI) AddGateway

func (r ResourceURI) AddGateway(id string) ResourceURI

AddGateway appends gateway segment to the URI

func (ResourceURI) AppendAccessRequest

func (r ResourceURI) AppendAccessRequest(id string) ResourceURI

AppendAccessRequest appends access request segment to the URI

func (ResourceURI) AppendApp

func (r ResourceURI) AppendApp(name string) ResourceURI

AppendApp appends app segment to the URI

func (ResourceURI) AppendDB

func (r ResourceURI) AppendDB(name string) ResourceURI

AppendDB appends database segment to the URI

func (ResourceURI) AppendKube

func (r ResourceURI) AppendKube(name string) ResourceURI

AppendKube appends kube segment to the URI

func (ResourceURI) AppendLeafCluster

func (r ResourceURI) AppendLeafCluster(name string) ResourceURI

AppendLeafCluster appends leaf cluster segment to the URI

func (ResourceURI) AppendServer

func (r ResourceURI) AppendServer(id string) ResourceURI

AppendServer appends server segment to the URI

func (ResourceURI) GetDbName

func (r ResourceURI) GetDbName() string

GetDbName extracts the database name from r. Returns an empty string if path is not a database URI.

func (ResourceURI) GetLeafClusterName

func (r ResourceURI) GetLeafClusterName() string

GetLeafClusterName returns leaf cluster name

func (ResourceURI) GetProfileName

func (r ResourceURI) GetProfileName() string

func (ResourceURI) GetRootClusterURI

func (r ResourceURI) GetRootClusterURI() ResourceURI

GetRootClusterURI trims the existing ResourceURI into a URI that points solely at the root cluster.

func (ResourceURI) String

func (r ResourceURI) String() string

String returns string representation of the Resource URI

Jump to

Keyboard shortcuts

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