clients

package
v0.1.20 Latest Latest
Warning

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

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

Documentation

Overview

Package clients clients.go This module creates a list of client instances for any cloud provider so each client only gets instantiated once and can be shared among other callers.

Adding Clients To add new clients, add to the Clients struct a field that represents how the client should be handled Then add a method to Clients that either creates + memoizes, or returns the memoized client per the client initialization procedure. These should be pulbic facing methods as they should be used to retrieve clients

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientConfigs

type ClientConfigs struct {
	AwsRegion                                           string
	OneLoginClientID, OneLoginClientSecret, OneLoginURL string
	OktaOrgName, OktaBaseURL, OktaAPIToken              string
}

type Clients

type Clients struct {
	OneLogin *client.APIClient
	AwsIam   *iam.IAM
	Okta     *okta.Client
	ClientConfigs
}

Clients is a list of memoized instantiated clients

func New

func New(credsFile *os.File) *Clients

func (*Clients) AwsIamClient

func (c *Clients) AwsIamClient() *iam.IAM

AwsIamClient creates and returns an instance of the AWS API client if one does not exist Memoizes the AWS API client and returns that instance on every subsequent call

func (*Clients) OktaClient added in v0.1.8

func (c *Clients) OktaClient() *okta.Client

func (*Clients) OneLoginClient

func (c *Clients) OneLoginClient() *client.APIClient

OneLoginClient creates and returns an instance of the OneLogin API client if one does not exist Memoizes the OneLogin API client and returns that instance on every subsequent call

Jump to

Keyboard shortcuts

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