Documentation
¶
Index ¶
- type ManagedBlockchainService
- type Member
- type Network
- type Node
- type Proposal
- type ProposalVote
- type Store
- func (s *Store) CreateNetwork(name, description, framework, frameworkVersion string) (*Network, *Member, error)
- func (s *Store) CreateNode(networkID, memberID, instanceType, az string) (*Node, error)
- func (s *Store) CreateProposal(networkID, description, memberID string) (*Proposal, error)
- func (s *Store) DeleteNetwork(id string) bool
- func (s *Store) DeleteNode(networkID, nodeID string) bool
- func (s *Store) GetMember(networkID, memberID string) (*Member, bool)
- func (s *Store) GetNetwork(id string) (*Network, bool)
- func (s *Store) GetNode(networkID, nodeID string) (*Node, bool)
- func (s *Store) GetProposal(networkID, proposalID string) (*Proposal, bool)
- func (s *Store) ListMembers(networkID string) []*Member
- func (s *Store) ListNetworks() []*Network
- func (s *Store) ListNodes(networkID string) []*Node
- func (s *Store) ListProposals(networkID string) []*Proposal
- func (s *Store) VoteOnProposal(networkID, proposalID, voterMemberID, vote string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ManagedBlockchainService ¶
type ManagedBlockchainService struct {
// contains filtered or unexported fields
}
ManagedBlockchainService is the cloudmock implementation of the Amazon Managed Blockchain API.
func New ¶
func New(accountID, region string) *ManagedBlockchainService
New returns a new ManagedBlockchainService for the given AWS account ID and region.
func (*ManagedBlockchainService) Actions ¶
func (s *ManagedBlockchainService) Actions() []service.Action
Actions returns the list of Managed Blockchain API actions supported by this service.
func (*ManagedBlockchainService) HandleRequest ¶
func (s *ManagedBlockchainService) HandleRequest(ctx *service.RequestContext) (*service.Response, error)
HandleRequest routes an incoming Managed Blockchain request to the appropriate handler.
func (*ManagedBlockchainService) HealthCheck ¶
func (s *ManagedBlockchainService) HealthCheck() error
HealthCheck always returns nil.
func (*ManagedBlockchainService) Name ¶
func (s *ManagedBlockchainService) Name() string
Name returns the AWS service name used for routing.
type Member ¶
type Member struct {
ID string
NetworkID string
Name string
Description string
Status string
CreationDate time.Time
}
Member represents a network member.
type Network ¶
type Network struct {
ID string
Name string
Description string
Framework string
FrameworkVersion string
Status string
CreationDate time.Time
// contains filtered or unexported fields
}
Network represents a Managed Blockchain network.
type Node ¶
type Node struct {
ID string
NetworkID string
MemberID string
InstanceType string
AvailabilityZone string
Status string
CreationDate time.Time
// contains filtered or unexported fields
}
Node represents a peer node.
type Proposal ¶
type Proposal struct {
ProposalID string
NetworkID string
Description string
ProposedByMemberID string
Status string
CreationDate time.Time
ExpirationDate time.Time
YesVoteCount int
NoVoteCount int
OutstandingVoteCount int
Votes []ProposalVote
}
Proposal represents a network proposal.
type ProposalVote ¶
ProposalVote represents a vote on a proposal.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store manages Managed Blockchain resources in memory.
func (*Store) CreateNetwork ¶
func (s *Store) CreateNetwork(name, description, framework, frameworkVersion string) (*Network, *Member, error)
CreateNetwork creates a new network.
func (*Store) CreateNode ¶
CreateNode creates a node in a network.
func (*Store) CreateProposal ¶
CreateProposal creates a proposal.
func (*Store) DeleteNetwork ¶
DeleteNetwork removes a network.
func (*Store) DeleteNode ¶
DeleteNode removes a node.
func (*Store) GetNetwork ¶
GetNetwork retrieves a network.
func (*Store) GetProposal ¶
GetProposal retrieves a proposal.
func (*Store) ListMembers ¶
ListMembers returns all members for a network.
func (*Store) ListNetworks ¶
ListNetworks returns all networks.
func (*Store) ListProposals ¶
ListProposals returns all proposals for a network.
func (*Store) VoteOnProposal ¶
VoteOnProposal records a vote on a proposal.