Documentation
¶
Index ¶
- func CheckForUniqueBastion(bastions map[string]string) (string, string)
- func CreateBastionSession(bastionClient bastion.BastionClient, bastionId string, sessionType string, ...) *string
- func FetchBastions(compartmentId string, client bastion.BastionClient) map[string]string
- func FetchClusterId(containerEngineClient containerengine.ContainerEngineClient, ...) string
- func FetchCompartments(tenancyId string, identityClient identity.IdentityClient) map[string]string
- func FindCompartments(tenancyId string, tenancyName string, identityClient identity.IdentityClient, ...)
- func FindInstances(computeClient core.ComputeClient, vnetClient core.VirtualNetworkClient, ...)
- func FindPolicies(identityClient identity.IdentityClient, compartmentId string, ...)
- func ListBastionSessions(bastionClient bastion.BastionClient, bastionId string, tenancyName string, ...)
- func ListBastions(bastions map[string]string, tenancyName string, compartmentName string)
- func ListCompartments(compartments map[string]string, tenancyId string, tenancyName string)
- func ListImages(computeClient core.ComputeClient, compartmentId string, compartment string, ...)
- func ListInstances(computeClient core.ComputeClient, compartmentId string, ...)
- func ListPolicies(identityClient identity.IdentityClient, compartmentId string, ...)
- func ListSubnets(client core.VirtualNetworkClient, compartmentId string)
- func LookupCompartmentId(compartments map[string]string, tenancyId string, tenancyName string, ...) string
- func PrintClusters(clusters []Cluster, tenancyName string, compartmentName string)
- func PrintDatabases(databases []Database, tenancyName string, compartmentName string)
- func PrintManagedSshCommands(bastionClient bastion.BastionClient, sessionId *string, instanceIp string, ...)
- func PrintPortFwSshCommands(bastionClient bastion.BastionClient, sessionId *string, targetIp string, ...)
- func SetCompartmentName(compartmentName string)
- type Cluster
- type Database
- type Image
- type Instance
- type Policy
- type Session
- type Subnet
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckForUniqueBastion ¶
Determine bastion name and then lookup ID
func CreateBastionSession ¶
func CreateBastionSession(bastionClient bastion.BastionClient, bastionId string, sessionType string, publicKeyContent string, targetIp string, sshPort int, hostFwPort int, sessionTtl int, targetInstanceId string, sshUser string) *string
Create a port forward SSH bastion session
func FetchBastions ¶
func FetchBastions(compartmentId string, client bastion.BastionClient) map[string]string
Fetch all bastions via OCI API call
func FetchClusterId ¶
func FetchClusterId(containerEngineClient containerengine.ContainerEngineClient, compartmentId string, clusterName string) string
func FetchCompartments ¶
func FetchCompartments(tenancyId string, identityClient identity.IdentityClient) map[string]string
Fetch compartments (names/IDs) from OCI
func FindCompartments ¶
func FindCompartments(tenancyId string, tenancyName string, identityClient identity.IdentityClient, namePattern string)
func FindInstances ¶
func FindInstances(computeClient core.ComputeClient, vnetClient core.VirtualNetworkClient, compartmentId string, flagSearchString string, retrieveImageInfo bool, compartment string, tenancyName string)
Find and print instances (OCI API call) TODO: Consider consolidating FindInstances and ListInstances similar to OKE
func FindPolicies ¶
func FindPolicies(identityClient identity.IdentityClient, compartmentId string, flagPolicyFind string, flagPolicyFindStatement string, flagPolicyListNameOnly bool)
Find and print policies (OCI API call)
func ListBastionSessions ¶
func ListBastionSessions(bastionClient bastion.BastionClient, bastionId string, tenancyName string, compartmentName string, listOnlyActiveSessions bool)
List and print all active bastion sessions
func ListBastions ¶
List and print bastions (OCI API call)
func ListCompartments ¶
Sort, list, and print compartments
func ListImages ¶
func ListImages(computeClient core.ComputeClient, compartmentId string, compartment string, tenancyName string)
List and print images (OCI API call)
func ListInstances ¶
func ListInstances(computeClient core.ComputeClient, compartmentId string, vnetClient core.VirtualNetworkClient, retrieveImageInfo bool, compartment string, tenancyName string)
List and print instances (OCI API call)
func ListPolicies ¶
func ListPolicies(identityClient identity.IdentityClient, compartmentId string, flagPolicyListNameOnly bool)
List and print policies (OCI API call)
func ListSubnets ¶
func ListSubnets(client core.VirtualNetworkClient, compartmentId string)
List and print subnets (OCI API call)
func LookupCompartmentId ¶
func LookupCompartmentId(compartments map[string]string, tenancyId string, tenancyName string, compartmentName string) string
Determine compartment name or ID, lookup name from ID if ID is given
func PrintClusters ¶
Print clusters
func PrintDatabases ¶ added in v1.3.0
Print databases
func PrintManagedSshCommands ¶
func PrintManagedSshCommands(bastionClient bastion.BastionClient, sessionId *string, instanceIp string, sshUser string, sshPort int, sshIdentityFile string, localFwPort int, hostFwPort int)
Print SSH commands to connect via bastion
func PrintPortFwSshCommands ¶
func PrintPortFwSshCommands(bastionClient bastion.BastionClient, sessionId *string, targetIp string, sshPort int, sshPrivateKey string, localFwPort int, hostFwPort int, flagOkeId string)
Print port forward SSH commands to connect via bastion
func SetCompartmentName ¶
func SetCompartmentName(compartmentName string)
Sets compartment name in Viper config
Types ¶
type Cluster ¶
type Cluster struct {
// contains filtered or unexported fields
}
func FindClusters ¶
func FindClusters(containerEngineClient containerengine.ContainerEngineClient, compartmentId string, searchString string) []Cluster
Find clusters matching search pattern
type Database ¶ added in v1.3.0
type Database struct {
// contains filtered or unexported fields
}
func FindDatabases ¶ added in v1.3.0
func FindDatabases(databaseClient database.DatabaseClient, compartmentId string, searchString string) []Database
Find databases matching search pattern
type Instance ¶
type Instance struct {
// contains filtered or unexported fields
}
TODO: Add operating system from image
type Session ¶
type Session struct {
State bastion.SessionLifecycleStateEnum
// contains filtered or unexported fields
}
func FetchSession ¶
func FetchSession(bastionClient bastion.BastionClient, sessionId *string, flagType string) Session
Check status of bastion session