kaleido

package
v0.0.0-...-6a3e297 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2023 License: Apache-2.0 Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountBalance

type AccountBalance struct {
	Balance string `json:"balance,omitempty"`
}

AccountBalance represents an account's balance

type AppCreds

type AppCreds struct {
	MembershipID string `json:"membership_id,omitempty"`
	Name         string `json:"name,omitempty"`
	AuthType     string `json:"auth_type,omitempty"`
	Username     string `json:"username,omitempty"`
	Password     string `json:"password,omitempty"`
	ID           string `json:"_id,omitempty"`
}

func NewAppCreds

func NewAppCreds(membershipID string) AppCreds

func NewAppCredsWithName

func NewAppCredsWithName(membershipID, name string) AppCreds

type CZone

type CZone struct {
	Name   string `json:"name,omitempty"`
	ID     string `json:"_id,omitempty"`
	Region string `json:"region,omitempty"`
	Cloud  string `json:"cloud,omitempty"`
	Type   string `json:"type,omitempty"`
}

func NewCZone

func NewCZone(name, region, cloud string) CZone

type Channel

type Channel struct {
	ID                string              `json:"_id,omitempty"`
	Name              string              `json:"name"`
	Description       string              `json:"description,omitempty"`
	MembershipID      string              `json:"membership_id,omitempty"`
	Members           []string            `json:"members"`
	State             string              `json:"state,omitempty"`
	ChannelMapVersion uint                `json:"channel_map_version,omitempty"`
	Contracts         map[string]Contract `json:"contracts,omitempty"`
}

func NewChannel

func NewChannel(name, membershipID string, members []string) Channel

type Configuration

type Configuration struct {
	ID           string                 `json:"_id,omitempty"`
	Name         string                 `json:"name,omitempty"`
	MembershipID string                 `json:"membership_id,omitempty"`
	Type         string                 `json:"type,omitempty"`
	Details      map[string]interface{} `json:"details,omitempty"`
}

func NewConfiguration

func NewConfiguration(name, membershipID, configType string, details map[string]interface{}) Configuration

type Consortium

type Consortium struct {
	ID          string `json:"_id,omitempty"`
	Name        string `json:"name,omitempty"`
	Description string `json:"description,omitempty"`
	DeletedAt   string `json:"deleted_at,omitempty"`
	State       string `json:"state,omitempty"`
}

Consortium consortium

func NewConsortium

func NewConsortium(name, description string) Consortium

type Contract

type Contract struct {
	Label        string `json:"label,omitempty"`
	Sequence     string `json:"sequence,omitempty"`
	InitRequired bool   `json:"init_required,omitempty"`
	ContractId   string `json:"contract_id,omitempty"`
}

type Destination

type Destination struct {
	Name           string `json:"name,omitempty"`
	KaleidoManaged bool   `json:"kaleido_managed,omitempty"`
	URI            string `json:"uri,omitempty"`
	SetupComplete  bool   `json:"setup_complete,omitempty"`
}

func NewDestination

func NewDestination(name string) Destination

type EZone

type EZone struct {
	Name     string `json:"name,omitempty"`
	ID       string `json:"_id,omitempty"`
	Region   string `json:"region,omitempty"`
	Cloud    string `json:"cloud,omitempty"`
	Type     string `json:"type,omitempty"`
	BridgeID string `json:"bridge_id,omitempty"`
}

func NewEZone

func NewEZone(name, region, cloud string) EZone

type Environment

type Environment struct {
	Name              string                 `json:"name,omitempty"`
	Description       string                 `json:"description,omitempty"`
	Provider          string                 `json:"provider,omitempty"`
	ConsensusType     string                 `json:"consensus_type,omitempty"`
	ID                string                 `json:"_id,omitempty,omitempty"`
	State             string                 `json:"state,omitempty"`
	ReleaseID         string                 `json:"release_id,omitempty"`
	TestFeatures      map[string]interface{} `json:"test_features,omitempty"`
	BlockPeriod       int                    `json:"block_period,omitempty"`
	ChainID           uint                   `json:"chain_id,omitempty"`
	PrefundedAccounts map[string]interface{} `json:"prefunded_accounts,omitempty"`
}

Environment fields

func NewEnvironment

func NewEnvironment(name, description, provider, consensus string, multiRegion bool, blockPeriod int, prefundedAccounts map[string]string, chainID uint) Environment

NewEnvironment creates a new environment

type Invitation

type Invitation struct {
	OrgName string `json:"org_name,omitempty"`
	Email   string `json:"email,omitempty"`
	ID      string `json:"_id,omitempty"`
	State   string `json:"state,omitempty"`
}

func NewInvitation

func NewInvitation(orgName, email string) Invitation

type KaleidoClient

type KaleidoClient struct {
	Client *resty.Client
}

KaleidoClient is the REST client

func NewClient

func NewClient(api string, apiKey string) KaleidoClient

func (*KaleidoClient) CreateAppCreds

func (c *KaleidoClient) CreateAppCreds(consortiumID, envID string, appcreds *AppCreds) (*resty.Response, error)

func (*KaleidoClient) CreateCZone

func (c *KaleidoClient) CreateCZone(consortium string, ezone *CZone) (*resty.Response, error)

func (*KaleidoClient) CreateChannel

func (c *KaleidoClient) CreateChannel(consortium, envID string, channel *Channel) (*resty.Response, error)

func (*KaleidoClient) CreateConfiguration

func (c *KaleidoClient) CreateConfiguration(consortium, envID string, config *Configuration) (*resty.Response, error)

func (*KaleidoClient) CreateConsortium

func (c *KaleidoClient) CreateConsortium(consortium *Consortium) (*resty.Response, error)

func (*KaleidoClient) CreateDestination

func (c *KaleidoClient) CreateDestination(serviceType, serviceID string, destination *Destination) (*resty.Response, error)

func (*KaleidoClient) CreateEZone

func (c *KaleidoClient) CreateEZone(consortium, envID string, ezone *EZone) (*resty.Response, error)

func (*KaleidoClient) CreateEnvironment

func (c *KaleidoClient) CreateEnvironment(consortiumID string, environment *Environment) (*resty.Response, error)

CreateEnvironment initiates request to create a new environment

func (*KaleidoClient) CreateInvitation

func (c *KaleidoClient) CreateInvitation(consortiaID string, invitation *Invitation) (*resty.Response, error)

func (*KaleidoClient) CreateMembership

func (c *KaleidoClient) CreateMembership(consortiaID string, membership *Membership) (*resty.Response, error)

func (*KaleidoClient) CreateMembershipVerification

func (c *KaleidoClient) CreateMembershipVerification(consortiaID, membershipID string, verification *MembershipVerification) (*resty.Response, error)

func (*KaleidoClient) CreateNode

func (c *KaleidoClient) CreateNode(consortium, envID string, node *Node) (*resty.Response, error)

func (*KaleidoClient) CreateService

func (c *KaleidoClient) CreateService(consortium, envID string, service *Service) (*resty.Response, error)

func (*KaleidoClient) DeleteAppCreds

func (c *KaleidoClient) DeleteAppCreds(consortiumID, envID, appcredsID string) (*resty.Response, error)

func (*KaleidoClient) DeleteCZone

func (c *KaleidoClient) DeleteCZone(consortium, ezoneID string) (*resty.Response, error)

func (*KaleidoClient) DeleteConfiguration

func (c *KaleidoClient) DeleteConfiguration(consortium, envID, configID string) (*resty.Response, error)

func (*KaleidoClient) DeleteConsortium

func (c *KaleidoClient) DeleteConsortium(consortiumID string) (*resty.Response, error)

func (*KaleidoClient) DeleteDestination

func (c *KaleidoClient) DeleteDestination(serviceType, serviceID, destName string) (*resty.Response, error)

func (*KaleidoClient) DeleteEZone

func (c *KaleidoClient) DeleteEZone(consortium, envID, ezoneID string) (*resty.Response, error)

func (*KaleidoClient) DeleteEnvironment

func (c *KaleidoClient) DeleteEnvironment(consortiumID, environmentID string) (*resty.Response, error)

DeleteEnvironment deletes an environment

func (*KaleidoClient) DeleteInvitation

func (c *KaleidoClient) DeleteInvitation(consortiaID, invitationID string) (*resty.Response, error)

func (*KaleidoClient) DeleteMembership

func (c *KaleidoClient) DeleteMembership(consortiaID, membershipID string) (*resty.Response, error)

func (*KaleidoClient) DeleteNode

func (c *KaleidoClient) DeleteNode(consortium, envID, nodeID string) (*resty.Response, error)

func (*KaleidoClient) DeleteService

func (c *KaleidoClient) DeleteService(consortium, envID, serviceID string) (*resty.Response, error)

func (*KaleidoClient) GetAppCreds

func (c *KaleidoClient) GetAppCreds(consortiumID, envID, appcredsID string, resultBox *AppCreds) (*resty.Response, error)

func (*KaleidoClient) GetCZone

func (c *KaleidoClient) GetCZone(consortiumID, ezoneID string, resultBox *CZone) (*resty.Response, error)

func (*KaleidoClient) GetChannel

func (c *KaleidoClient) GetChannel(consortium, envID, id string, resultBox *Channel) (*resty.Response, error)

func (*KaleidoClient) GetConfiguration

func (c *KaleidoClient) GetConfiguration(consortiumID, envID, configID string, resultBox *Configuration) (*resty.Response, error)

func (*KaleidoClient) GetConsortium

func (c *KaleidoClient) GetConsortium(id string, resultBox *Consortium) (*resty.Response, error)

func (*KaleidoClient) GetDestination

func (c *KaleidoClient) GetDestination(serviceType, serviceID, destName string, resultBox *Destination) (*resty.Response, error)

func (*KaleidoClient) GetEZone

func (c *KaleidoClient) GetEZone(consortiumID, envID, ezoneID string, resultBox *EZone) (*resty.Response, error)

func (*KaleidoClient) GetEnvironment

func (c *KaleidoClient) GetEnvironment(consortiumID, environmentID string, resultBox *Environment) (*resty.Response, error)

GetEnvironment details

func (*KaleidoClient) GetInvitation

func (c *KaleidoClient) GetInvitation(consortiaID, invitationID string, resultBox *Invitation) (*resty.Response, error)

func (*KaleidoClient) GetMembership

func (c *KaleidoClient) GetMembership(consortiaID, membershipID string, resultBox *Membership) (*resty.Response, error)

func (*KaleidoClient) GetNode

func (c *KaleidoClient) GetNode(consortiumID, envID, nodeID string, resultBox *Node) (*resty.Response, error)

func (*KaleidoClient) GetPrivateStackBridgeConfig

func (c *KaleidoClient) GetPrivateStackBridgeConfig(consortiumID, envID, serviceID string, resultBox *map[string]interface{}) (*resty.Response, error)

func (*KaleidoClient) GetRelease

func (c *KaleidoClient) GetRelease(provider, version string, resultBox *[]Release) (*resty.Response, error)

func (*KaleidoClient) GetService

func (c *KaleidoClient) GetService(consortiumID, envID, serviceID string, resultBox *Service) (*resty.Response, error)

func (*KaleidoClient) ListAppCreds

func (c *KaleidoClient) ListAppCreds(consortiumID, envID string, resultBox *[]AppCreds) (*resty.Response, error)

func (*KaleidoClient) ListCZones

func (c *KaleidoClient) ListCZones(consortium string, resultBox *[]CZone) (*resty.Response, error)

func (*KaleidoClient) ListChannel

func (c *KaleidoClient) ListChannel(consortium, envID string, resultBox *[]Channel) (*resty.Response, error)

func (*KaleidoClient) ListConfigurations

func (c *KaleidoClient) ListConfigurations(consortium, envID string, resultBox *[]Configuration) (*resty.Response, error)

func (*KaleidoClient) ListConsortium

func (c *KaleidoClient) ListConsortium(resultBox *[]Consortium) (*resty.Response, error)

func (*KaleidoClient) ListDestinations

func (c *KaleidoClient) ListDestinations(serviceType, serviceID string, resultBox *[]Destination) (*resty.Response, error)

func (*KaleidoClient) ListEZones

func (c *KaleidoClient) ListEZones(consortium, envID string, resultBox *[]EZone) (*resty.Response, error)

func (*KaleidoClient) ListEnvironments

func (c *KaleidoClient) ListEnvironments(consortiumID string, resultBox *[]Environment) (*resty.Response, error)

ListEnvironments lists existing environment

func (*KaleidoClient) ListInvitations

func (c *KaleidoClient) ListInvitations(consortiaID string, resultBox *[]Invitation) (*resty.Response, error)

func (*KaleidoClient) ListMemberships

func (c *KaleidoClient) ListMemberships(consortiaID string, resultBox *[]Membership) (*resty.Response, error)

func (*KaleidoClient) ListNodes

func (c *KaleidoClient) ListNodes(consortium, envID string, resultBox *[]Node) (*resty.Response, error)

func (*KaleidoClient) ListReleases

func (c *KaleidoClient) ListReleases(resultBox *[]Release) (*resty.Response, error)

func (*KaleidoClient) ListServices

func (c *KaleidoClient) ListServices(consortium, envID string, resultBox *[]Service) (*resty.Response, error)

func (*KaleidoClient) RegenerateAppCreds

func (c *KaleidoClient) RegenerateAppCreds(consortiumID, envID, appcredsID string, appcreds *AppCreds) (*resty.Response, error)

func (*KaleidoClient) RegisterMembershipIdentity

func (c *KaleidoClient) RegisterMembershipIdentity(idregistryID, membershipID string) (*resty.Response, error)

func (*KaleidoClient) ResetNode

func (c *KaleidoClient) ResetNode(consortium, envID, nodeID string) (*resty.Response, error)

func (*KaleidoClient) ResetService

func (c *KaleidoClient) ResetService(consortium, envID, serviceID string) (*resty.Response, error)

func (*KaleidoClient) UpdateAppCreds

func (c *KaleidoClient) UpdateAppCreds(consortiumID, envID, appcredsID string, appcreds *AppCreds) (*resty.Response, error)

func (*KaleidoClient) UpdateCZone

func (c *KaleidoClient) UpdateCZone(consortium, ezoneID string, ezone *CZone) (*resty.Response, error)

func (*KaleidoClient) UpdateChannel

func (c *KaleidoClient) UpdateChannel(consortium, envID, id string, channel *Channel) (*resty.Response, error)

func (*KaleidoClient) UpdateConfiguration

func (c *KaleidoClient) UpdateConfiguration(consortium, envID, configID string, config *Configuration) (*resty.Response, error)

func (*KaleidoClient) UpdateConsortium

func (c *KaleidoClient) UpdateConsortium(id string, consortium *Consortium) (*resty.Response, error)

func (*KaleidoClient) UpdateDestination

func (c *KaleidoClient) UpdateDestination(serviceType, serviceID, destName string, destination *Destination) (*resty.Response, error)

func (*KaleidoClient) UpdateEZone

func (c *KaleidoClient) UpdateEZone(consortium, envID, ezoneID string, ezone *EZone) (*resty.Response, error)

func (*KaleidoClient) UpdateEnvironment

func (c *KaleidoClient) UpdateEnvironment(consortiumID, environmentID string, environment *Environment) (*resty.Response, error)

UpdateEnvironment updates an environment

func (*KaleidoClient) UpdateInvitation

func (c *KaleidoClient) UpdateInvitation(consortiaID, invitationID string, invitation *Invitation) (*resty.Response, error)

func (*KaleidoClient) UpdateMembership

func (c *KaleidoClient) UpdateMembership(consortiaID, membershipID string, membership *Membership) (*resty.Response, error)

func (*KaleidoClient) UpdateNode

func (c *KaleidoClient) UpdateNode(consortium, envID, nodeID string, node *Node) (*resty.Response, error)

func (*KaleidoClient) UpdateService

func (c *KaleidoClient) UpdateService(consortium, envID, serviceID string, service *Service) (*resty.Response, error)

type Membership

type Membership struct {
	OrgName           string `json:"org_name,omitempty"`
	ID                string `json:"_id,omitempty"`
	VerificationProof string `json:"verification_proof,omitempty"`
}

func NewMembership

func NewMembership(orgName string) Membership

type MembershipIdentityRegistration

type MembershipIdentityRegistration struct {
	MembershipID string `json:"membership_id,omitempty"`
}

type MembershipVerification

type MembershipVerification struct {
	TestCertificate bool   `json:"test_certificate,omitempty"`
	ProofID         string `json:"proof_id,omitempty"`
}

func NewMembershipVerification

func NewMembershipVerification() MembershipVerification

type Node

type Node struct {
	Name                 string                 `json:"name,omitempty"`
	MembershipID         string                 `json:"membership_id,omitempty"`
	ZoneID               string                 `json:"zone_id,omitempty"`
	ID                   string                 `json:"_id,omitempty"`
	State                string                 `json:"state,omitempty"`
	Role                 string                 `json:"role,omitempty"`
	Provider             string                 `json:"provider,omitempty"`
	ConsensusType        string                 `json:"consensus_type,omitempty"`
	Size                 string                 `json:"size,omitempty"`
	Urls                 map[string]interface{} `json:"urls,omitempty"`
	FirstUserAccount     string                 `json:"first_user_account,omitempty"`
	OpsmetricID          string                 `json:"opsmetric_id,omitempty"`
	NetworkingID         string                 `json:"networking_id,omitempty"`
	KmsID                string                 `json:"kms_id,omitempty"`
	BackupID             string                 `json:"backup_id,omitempty"`
	NodeConfigID         string                 `json:"node_config_id,omitempty"`
	BafID                string                 `json:"baf_id,omitempty"`
	HybridPortAllocation int64                  `json:"hybrid_port_allocation,omitempty"`
	NodeIdentity         string                 `json:"node_identity_data,omitempty"`
	DatabaseType         string                 `json:"database_type,omitempty"`
}

func NewNode

func NewNode(name, membershipID, ezoneID string) Node

type Release

type Release struct {
	ID            string `json:"_id,omitempty"`
	Provider      string `json:"provider,omitempty"`
	Version       string `json:"version,omitempty"`
	VersionPadded string `json:"version_padded,omitempty"`
	ReleaseStatus string `json:"release_status,omitempty"`
}

type Service

type Service struct {
	Name                 string                 `json:"name,omitempty"`
	Service              string                 `json:"service,omitempty"`
	ServiceType          string                 `json:"service_type,omitempty"`
	ZoneID               string                 `json:"zone_id,omitempty"`
	MembershipID         string                 `json:"membership_id,omitempty"`
	ID                   string                 `json:"_id,omitempty"`
	Size                 string                 `json:"size,omitempty"`
	State                string                 `json:"state,omitempty"`
	HybridPortAllocation int64                  `json:"hybrid_port_allocation,omitempty"`
	Urls                 map[string]interface{} `json:"urls,omitempty"`
	Details              map[string]interface{} `json:"details,omitempty"`
}

func NewService

func NewService(name, service, membershipID string, zoneID string, details map[string]interface{}) Service

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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