Documentation ¶
Index ¶
- type ResourceURI
- func (r ResourceURI) AddGateway(id string) ResourceURI
- func (r ResourceURI) AppendAccessRequest(id string) ResourceURI
- func (r ResourceURI) AppendApp(name string) ResourceURI
- func (r ResourceURI) AppendDB(name string) ResourceURI
- func (r ResourceURI) AppendKube(name string) ResourceURI
- func (r ResourceURI) AppendLeafCluster(name string) ResourceURI
- func (r ResourceURI) AppendServer(id string) ResourceURI
- func (r ResourceURI) GetDbName() string
- func (r ResourceURI) GetLeafClusterName() string
- func (r ResourceURI) GetProfileName() string
- func (r ResourceURI) GetRootClusterURI() ResourceURI
- func (r ResourceURI) String() string
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 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