accountv1

package
v0.0.0-...-9e96525 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 14 Imported by: 15

Documentation

Index

Constants

View Source
const ErrCodeNoAccountExists = "NoAccountExists"

ErrCodeNoAccountExists ...

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountEntity

type AccountEntity struct {
	Name          string                       `json:"name"`
	Type          string                       `json:"type"`
	State         string                       `json:"state"`
	OwnerIamId    string                       `json:"owner_iam_id"`
	CountryCode   string                       `json:"country_code"`
	CurrencyCode  string                       `json:"currency_code"`
	Organizations []models.AccountOrganization `json:"organizations_region"`
}

type AccountInviteResponse

type AccountInviteResponse struct {
	Id    string `json:"id"`
	Email string `json:"email"`
	State string `json:"state"`
}

Account Invites ...

type AccountResource

type AccountResource struct {
	Metadata Metadata
	Entity   AccountEntity
}

func (AccountResource) ToModel

func (resource AccountResource) ToModel() models.V2Account

type AccountServiceAPI

type AccountServiceAPI interface {
	Accounts() Accounts
}

AccountServiceAPI is the accountv2 client ...

func New

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

New ...

type AccountUser

type AccountUser struct {
	UserId      string `json:"userId"`
	FirstName   string `json:"firstname"`
	LastName    string `json:"lastname"`
	State       string `json:"state"`
	IbmUniqueId string `json:"ibmUniqueId"`
	Email       string `json:"email"`
	Phonenumber string `json:"phonenumber"`
	CreatedOn   string `json:"createdOn"`
	VerifiedOn  string `json:"verifiedOn"`
	Id          string `json:"id"`
	UaaGuid     string `json:"uaaGuid"`
	AccountId   string `json:"accountId"`
	Role        string `json:"role"`
	InvitedOn   string `json:"invitedOn"`
	Photo       string `json:"photo"`
}

type AccountUserEntity

type AccountUserEntity struct {
	AccountId   string `json:"account_id"`
	FirstName   string `json:"first_name"`
	LastName    string `json:"last_name"`
	State       string `json:"state"`
	Email       string `json:"email"`
	PhoneNumber string `json:"phonenumber"`
	Role        string `json:"role"`
	Photo       string `json:"photo"`
}

type AccountUserMetadata

type AccountUserMetadata Metadata

type AccountUserQueryResponse

type AccountUserQueryResponse struct {
	Metadata     Metadata
	AccountUsers []AccountUserResource `json:"resources"`
}

type AccountUserResource

type AccountUserResource struct {
	ID             string `json:"id"`
	IAMID          string `json:"iam_id"`
	Realm          string `json:"realm"`
	UserID         string `json:"user_id"`
	FirstName      string `json:"firstname"`
	LastName       string `json:"lastname"`
	State          string `json:"state"`
	Email          string `json:"email"`
	PhoneNumber    string `json:"phonenumber"`
	AltPhoneNumber string `json:"altphonenumber"`
	Photo          string `json:"photo"`
	InvitedOn      string `json:"invitedOn"`
	AddedOn        string `json:"added_on"`
	AccountID      string `json:"account_id"`

	Linkages []struct {
		Origin string `json:"origin"`
		ID     string `json:"id"`
	} `json:"linkages"`
}

AccountUserResource is the original user information returned by V2 endpoint (for listing)

func (AccountUserResource) ToModel

func (resource AccountUserResource) ToModel() models.AccountUser

type Accounts

type Accounts interface {
	GetAccountUsers(accountGuid string) ([]models.AccountUser, error)
	InviteAccountUser(accountGuid string, userEmail string) (AccountInviteResponse, error)
	DeleteAccountUser(accountGuid string, userGuid string) error
	FindAccountUserByUserId(accountGuid string, userId string) (*models.AccountUser, error)
	List() ([]models.V2Account, error)
	Get(accountId string) (models.V1Account, 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 Identity

type Identity struct {
	Id         string `json:"id"`
	UserName   string `json:"username"`
	Realmid    string `json:"realmid"`
	Identifier string `json:"identifier"`
}

type Metadata

type Metadata struct {
	Guid       string   `json:"guid"`
	Url        string   `json:"url"`
	CreatedAt  string   `json:"created_at"`
	UpdatedAt  string   `json:"updated_at"`
	VerifiedAt string   `json:"verified_at"`
	Identity   Identity `json:"identity"`
}

Jump to

Keyboard shortcuts

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