root

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package root provides a client for the "root" canister. Do NOT edit this file. It was automatically generated by https://github.com/aviate-labs/agent-go.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

type Agent struct {
	*agent.Agent
	CanisterId principal.Principal
}

Agent is a client for the "root" canister.

func NewAgent

func NewAgent(canisterId principal.Principal, config agent.Config) (*Agent, error)

NewAgent creates a new agent for the "root" canister.

func (Agent) CanisterStatus

func (a Agent) CanisterStatus(arg0 CanisterIdRecord) (*CanisterStatusResult, error)

CanisterStatus calls the "canister_status" method on the "root" canister.

func (Agent) ChangeCanister

func (a Agent) ChangeCanister(arg0 ChangeCanisterRequest) error

ChangeCanister calls the "change_canister" method on the "root" canister.

func (Agent) GetBuildMetadata

func (a Agent) GetBuildMetadata() (*string, error)

GetBuildMetadata calls the "get_build_metadata" method on the "root" canister.

func (Agent) GetSnsCanistersSummary

func (a Agent) GetSnsCanistersSummary(arg0 GetSnsCanistersSummaryRequest) (*GetSnsCanistersSummaryResponse, error)

GetSnsCanistersSummary calls the "get_sns_canisters_summary" method on the "root" canister.

func (Agent) ListSnsCanisters

func (a Agent) ListSnsCanisters(arg0 struct {
}) (*ListSnsCanistersResponse, error)

ListSnsCanisters calls the "list_sns_canisters" method on the "root" canister.

func (Agent) ManageDappCanisterSettings

ManageDappCanisterSettings calls the "manage_dapp_canister_settings" method on the "root" canister.

func (Agent) RegisterDappCanister

func (a Agent) RegisterDappCanister(arg0 RegisterDappCanisterRequest) (*struct {
}, error)

RegisterDappCanister calls the "register_dapp_canister" method on the "root" canister.

func (Agent) RegisterDappCanisters

func (a Agent) RegisterDappCanisters(arg0 RegisterDappCanistersRequest) (*struct {
}, error)

RegisterDappCanisters calls the "register_dapp_canisters" method on the "root" canister.

func (Agent) SetDappControllers

func (a Agent) SetDappControllers(arg0 SetDappControllersRequest) (*SetDappControllersResponse, error)

SetDappControllers calls the "set_dapp_controllers" method on the "root" canister.

type CanisterCallError

type CanisterCallError struct {
	Code        *int32 `ic:"code,omitempty" json:"code,omitempty"`
	Description string `ic:"description" json:"description"`
}

type CanisterIdRecord

type CanisterIdRecord struct {
	CanisterId principal.Principal `ic:"canister_id" json:"canister_id"`
}

type CanisterInstallMode

type CanisterInstallMode struct {
	Reinstall *idl.Null `ic:"reinstall,variant"`
	Upgrade   *idl.Null `ic:"upgrade,variant"`
	Install   *idl.Null `ic:"install,variant"`
}

type CanisterStatusResult

type CanisterStatusResult struct {
	Status                 CanisterStatusType       `ic:"status" json:"status"`
	MemorySize             idl.Nat                  `ic:"memory_size" json:"memory_size"`
	Cycles                 idl.Nat                  `ic:"cycles" json:"cycles"`
	Settings               DefiniteCanisterSettings `ic:"settings" json:"settings"`
	IdleCyclesBurnedPerDay *idl.Nat                 `ic:"idle_cycles_burned_per_day,omitempty" json:"idle_cycles_burned_per_day,omitempty"`
	ModuleHash             *[]byte                  `ic:"module_hash,omitempty" json:"module_hash,omitempty"`
	ReservedCycles         *idl.Nat                 `ic:"reserved_cycles,omitempty" json:"reserved_cycles,omitempty"`
}

type CanisterStatusResultV2

type CanisterStatusResultV2 struct {
	Status                 CanisterStatusType           `ic:"status" json:"status"`
	MemorySize             idl.Nat                      `ic:"memory_size" json:"memory_size"`
	Cycles                 idl.Nat                      `ic:"cycles" json:"cycles"`
	Settings               DefiniteCanisterSettingsArgs `ic:"settings" json:"settings"`
	IdleCyclesBurnedPerDay idl.Nat                      `ic:"idle_cycles_burned_per_day" json:"idle_cycles_burned_per_day"`
	ModuleHash             *[]byte                      `ic:"module_hash,omitempty" json:"module_hash,omitempty"`
}

type CanisterStatusType

type CanisterStatusType struct {
	Stopped  *idl.Null `ic:"stopped,variant"`
	Stopping *idl.Null `ic:"stopping,variant"`
	Running  *idl.Null `ic:"running,variant"`
}

type CanisterSummary

type CanisterSummary struct {
	Status     *CanisterStatusResultV2 `ic:"status,omitempty" json:"status,omitempty"`
	CanisterId *principal.Principal    `ic:"canister_id,omitempty" json:"canister_id,omitempty"`
}

type ChangeCanisterRequest

type ChangeCanisterRequest struct {
	Arg                  []byte              `ic:"arg" json:"arg"`
	WasmModule           []byte              `ic:"wasm_module" json:"wasm_module"`
	StopBeforeInstalling bool                `ic:"stop_before_installing" json:"stop_before_installing"`
	Mode                 CanisterInstallMode `ic:"mode" json:"mode"`
	CanisterId           principal.Principal `ic:"canister_id" json:"canister_id"`
	MemoryAllocation     *idl.Nat            `ic:"memory_allocation,omitempty" json:"memory_allocation,omitempty"`
	ComputeAllocation    *idl.Nat            `ic:"compute_allocation,omitempty" json:"compute_allocation,omitempty"`
}

type DefiniteCanisterSettings

type DefiniteCanisterSettings struct {
	FreezingThreshold   *idl.Nat              `ic:"freezing_threshold,omitempty" json:"freezing_threshold,omitempty"`
	Controllers         []principal.Principal `ic:"controllers" json:"controllers"`
	ReservedCyclesLimit *idl.Nat              `ic:"reserved_cycles_limit,omitempty" json:"reserved_cycles_limit,omitempty"`
	MemoryAllocation    *idl.Nat              `ic:"memory_allocation,omitempty" json:"memory_allocation,omitempty"`
	ComputeAllocation   *idl.Nat              `ic:"compute_allocation,omitempty" json:"compute_allocation,omitempty"`
}

type DefiniteCanisterSettingsArgs

type DefiniteCanisterSettingsArgs struct {
	FreezingThreshold idl.Nat               `ic:"freezing_threshold" json:"freezing_threshold"`
	Controllers       []principal.Principal `ic:"controllers" json:"controllers"`
	MemoryAllocation  idl.Nat               `ic:"memory_allocation" json:"memory_allocation"`
	ComputeAllocation idl.Nat               `ic:"compute_allocation" json:"compute_allocation"`
}

type FailedUpdate

type FailedUpdate struct {
	Err            *CanisterCallError   `ic:"err,omitempty" json:"err,omitempty"`
	DappCanisterId *principal.Principal `ic:"dapp_canister_id,omitempty" json:"dapp_canister_id,omitempty"`
}

type GetSnsCanistersSummaryRequest

type GetSnsCanistersSummaryRequest struct {
	UpdateCanisterList *bool `ic:"update_canister_list,omitempty" json:"update_canister_list,omitempty"`
}

type GetSnsCanistersSummaryResponse

type GetSnsCanistersSummaryResponse struct {
	Root       *CanisterSummary  `ic:"root,omitempty" json:"root,omitempty"`
	Swap       *CanisterSummary  `ic:"swap,omitempty" json:"swap,omitempty"`
	Ledger     *CanisterSummary  `ic:"ledger,omitempty" json:"ledger,omitempty"`
	Index      *CanisterSummary  `ic:"index,omitempty" json:"index,omitempty"`
	Governance *CanisterSummary  `ic:"governance,omitempty" json:"governance,omitempty"`
	Dapps      []CanisterSummary `ic:"dapps" json:"dapps"`
	Archives   []CanisterSummary `ic:"archives" json:"archives"`
}

type ListSnsCanistersResponse

type ListSnsCanistersResponse struct {
	Root       *principal.Principal  `ic:"root,omitempty" json:"root,omitempty"`
	Swap       *principal.Principal  `ic:"swap,omitempty" json:"swap,omitempty"`
	Ledger     *principal.Principal  `ic:"ledger,omitempty" json:"ledger,omitempty"`
	Index      *principal.Principal  `ic:"index,omitempty" json:"index,omitempty"`
	Governance *principal.Principal  `ic:"governance,omitempty" json:"governance,omitempty"`
	Dapps      []principal.Principal `ic:"dapps" json:"dapps"`
	Archives   []principal.Principal `ic:"archives" json:"archives"`
}

type ManageDappCanisterSettingsRequest

type ManageDappCanisterSettingsRequest struct {
	FreezingThreshold   *uint64               `ic:"freezing_threshold,omitempty" json:"freezing_threshold,omitempty"`
	CanisterIds         []principal.Principal `ic:"canister_ids" json:"canister_ids"`
	ReservedCyclesLimit *uint64               `ic:"reserved_cycles_limit,omitempty" json:"reserved_cycles_limit,omitempty"`
	LogVisibility       *int32                `ic:"log_visibility,omitempty" json:"log_visibility,omitempty"`
	WasmMemoryLimit     *uint64               `ic:"wasm_memory_limit,omitempty" json:"wasm_memory_limit,omitempty"`
	MemoryAllocation    *uint64               `ic:"memory_allocation,omitempty" json:"memory_allocation,omitempty"`
	ComputeAllocation   *uint64               `ic:"compute_allocation,omitempty" json:"compute_allocation,omitempty"`
}

type ManageDappCanisterSettingsResponse

type ManageDappCanisterSettingsResponse struct {
	FailureReason *string `ic:"failure_reason,omitempty" json:"failure_reason,omitempty"`
}

type RegisterDappCanisterRequest

type RegisterDappCanisterRequest struct {
	CanisterId *principal.Principal `ic:"canister_id,omitempty" json:"canister_id,omitempty"`
}

type RegisterDappCanistersRequest

type RegisterDappCanistersRequest struct {
	CanisterIds []principal.Principal `ic:"canister_ids" json:"canister_ids"`
}

type SetDappControllersRequest

type SetDappControllersRequest struct {
	CanisterIds            *RegisterDappCanistersRequest `ic:"canister_ids,omitempty" json:"canister_ids,omitempty"`
	ControllerPrincipalIds []principal.Principal         `ic:"controller_principal_ids" json:"controller_principal_ids"`
}

type SetDappControllersResponse

type SetDappControllersResponse struct {
	FailedUpdates []FailedUpdate `ic:"failed_updates" json:"failed_updates"`
}

type SnsRootCanister

type SnsRootCanister struct {
	DappCanisterIds                         []principal.Principal `ic:"dapp_canister_ids" json:"dapp_canister_ids"`
	Testflight                              bool                  `ic:"testflight" json:"testflight"`
	LatestLedgerArchivePollTimestampSeconds *uint64               `ic:"latest_ledger_archive_poll_timestamp_seconds,omitempty" json:"latest_ledger_archive_poll_timestamp_seconds,omitempty"`
	ArchiveCanisterIds                      []principal.Principal `ic:"archive_canister_ids" json:"archive_canister_ids"`
	GovernanceCanisterId                    *principal.Principal  `ic:"governance_canister_id,omitempty" json:"governance_canister_id,omitempty"`
	IndexCanisterId                         *principal.Principal  `ic:"index_canister_id,omitempty" json:"index_canister_id,omitempty"`
	SwapCanisterId                          *principal.Principal  `ic:"swap_canister_id,omitempty" json:"swap_canister_id,omitempty"`
	LedgerCanisterId                        *principal.Principal  `ic:"ledger_canister_id,omitempty" json:"ledger_canister_id,omitempty"`
}

Jump to

Keyboard shortcuts

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