awscatalogue

package
v1.3.12 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrAccountNotFound is returned when the name of an account is not found.
	ErrAccountNotFound = errors.New("Account not found")
)

Functions

This section is empty.

Types

type AWSAccounts

type AWSAccounts struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

AWSAccounts allows to query account names given an account id.

func NewAWSAccounts

func NewAWSAccounts(c Client, l log.Logger) *AWSAccounts

NewAWSAccounts returns an initialized instance of AWSAccounts service.

func (*AWSAccounts) AddName

func (c *AWSAccounts) AddName(accID, name string) error

AddName adds a new account_id, name pair to the cache.

func (*AWSAccounts) Name

func (c *AWSAccounts) Name(accID string) (string, error)

Name returns the name of an account given its ID.

func (*AWSAccounts) RefreshCache

func (c *AWSAccounts) RefreshCache() error

RefreshCache refreshes all the entries in the cache.

type Account

type Account struct {
	ID          string `json:"id"`
	AccountName string `json:"account_name"`
	Status      string `json:"status"`
}

Account represents administrative information related to an AWS account.

type Client

type Client interface {
	Accounts() ([]Account, error)
	Account(ID string) (Account, error)
}

Client represents the interface to interact with an AWS accounts catalogue service.

Directories

Path Synopsis
none
Package none provides a dummy implementation of the AWS catalogue client interface.
Package none provides a dummy implementation of the AWS catalogue client interface.

Jump to

Keyboard shortcuts

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