accountv2

package
v0.0.0-...-5c5b994 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: Apache-2.0 Imports: 12 Imported by: 62

Documentation

Index

Constants

View Source
const ErrCodeNoAccountExists = "NoAccountExists"

ErrCodeNoAccountExists ...

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	GUID          string
	Name          string
	Type          string
	State         string
	OwnerGUID     string
	OwnerUserID   string
	OwnerUniqueID string
	CustomerID    string
	CountryCode   string
	CurrencyCode  string
	Organizations []AccountOrganization
	Members       []AccountMember `json:"members"`
}

Account Model ...

type AccountEntity

type AccountEntity struct {
	Name          string                `json:"name"`
	Type          string                `json:"type"`
	State         string                `json:"state"`
	OwnerGUID     string                `json:"owner"`
	OwnerUserID   string                `json:"owner_userid"`
	OwnerUniqueID string                `json:"owner_unique_id"`
	CustomerID    string                `json:"customer_id"`
	CountryCode   string                `json:"country_code"`
	CurrencyCode  string                `json:"currency_code"`
	Organizations []AccountOrganization `json:"organizations_region"`
	Members       []AccountMember       `json:"members"`
}

AccountEntity ...

type AccountMember

type AccountMember struct {
	GUID     string `json:"guid"`
	UserID   string `json:"user_id"`
	UniqueID string `json:"unique_id"`
}

AccountMember ...

type AccountNameQueryResponse

type AccountNameQueryResponse struct {
	Metadata Metadata
	Entity   AccountEntity
}

AccountQueryResponse ...

func (AccountNameQueryResponse) ToModel

func (nameQueryResponse AccountNameQueryResponse) ToModel() Account

type AccountOrganization

type AccountOrganization struct {
	GUID   string `json:"guid"`
	Region string `json:"region"`
}

AccountOrganization ...

type AccountQueryResponse

type AccountQueryResponse struct {
	Metadata Metadata
	Accounts []AccountResource `json:"resources"`
}

AccountQueryResponse ...

type AccountResource

type AccountResource struct {
	Resource
	Entity AccountEntity
}

AccountResource ...

func (AccountResource) ToModel

func (resource AccountResource) ToModel() Account

ToModel ...

type AccountServiceAPI

type AccountServiceAPI interface {
	Accounts() Accounts
}

AccountServiceAPI is the accountv2 client ...

func New

func New(sess *session.Session) (AccountServiceAPI, error)

New ...

type Accounts

type Accounts interface {
	List() ([]Account, error)
	FindByOrg(orgGUID string, region string) (*Account, error)
	FindByOwner(userID string) (*Account, error)
	Get(accountId string) (*Account, error)
}

Accounts ...

type GenericPaginatedResourcesHandler

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

func NewAccountPaginatedResources

func NewAccountPaginatedResources(resource interface{}) GenericPaginatedResourcesHandler

func (GenericPaginatedResourcesHandler) Resources

func (pr GenericPaginatedResourcesHandler) Resources(data []byte, curURL string) ([]interface{}, string, error)

type Metadata

type Metadata struct {
	GUID string `json:"guid"`
	URL  string `json:"url"`
}

Metadata ...

type Resource

type Resource struct {
	Metadata Metadata
}

Resource ...

Jump to

Keyboard shortcuts

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