accountv1

package
v0.0.0-...-8be0c7b Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const ErrCodeNoAccountExists = "NoAccountExists"

ErrCodeNoAccountExists ...

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountInviteResponse

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

Account Invites ...

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 {
	Metadata AccountUserMetadata
	Entity   AccountUserEntity
}

func (AccountUserResource) ToModel

func (resource AccountUserResource) ToModel() AccountUser

type Accounts

type Accounts interface {
	GetAccountUsers(accountGuid string) ([]AccountUser, error)
	InviteAccountUser(accountGuid string, userEmail string) (AccountInviteResponse, error)
	DeleteAccountUser(accountGuid string, userGuid string) error
	FindAccountUserByUserId(accountGuid string, userId string) (*AccountUser, error)
}

Accounts ...

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