service

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: AGPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HasAccount added in v0.3.0

func HasAccount(db *leveldb.DB, address string) (found bool, err error)

func SetupGRPCConnection added in v0.3.4

func SetupGRPCConnection(cfg *config.Config) (conn *grpc.ClientConn, err error)

func StoreAccount added in v0.3.0

func StoreAccount(db *leveldb.DB, req types.PostCreateAccountRequest) (err error)

Types

type IPlanetmintClient added in v0.3.0

type IPlanetmintClient interface {
	AttestTAPublicKey(publicKey *secp256k1.PublicKey) error
	AttestTAPublicKeyHex(pubHexString string) error
	GetTrustAnchorStatus(machineID string) (res *machinetypes.QueryGetTrustAnchorStatusResponse, err error)
	GetAccount(plmntAddress string) (res *authtypes.QueryAccountResponse, err error)
	FundAccount(plmntAddress string) error
}

type PlanetmintClient added in v0.3.0

type PlanetmintClient struct {
	// contains filtered or unexported fields
}

func NewPlanetmintClient added in v0.3.0

func NewPlanetmintClient(actor string, conn *grpc.ClientConn) *PlanetmintClient

func (*PlanetmintClient) AttestTAPublicKey added in v0.3.0

func (pmc *PlanetmintClient) AttestTAPublicKey(publicKey *secp256k1.PublicKey) error

func (*PlanetmintClient) AttestTAPublicKeyHex added in v0.3.0

func (pmc *PlanetmintClient) AttestTAPublicKeyHex(pubHexString string) error

func (*PlanetmintClient) FundAccount added in v0.3.0

func (pmc *PlanetmintClient) FundAccount(plmntAddress string) error

func (*PlanetmintClient) GetAccount added in v0.3.0

func (pmc *PlanetmintClient) GetAccount(plmntAddress string) (res *authtypes.QueryAccountResponse, err error)

func (*PlanetmintClient) GetTrustAnchorStatus added in v0.3.0

func (pmc *PlanetmintClient) GetTrustAnchorStatus(machineID string) (res *machinetypes.QueryGetTrustAnchorStatusResponse, err error)

type TAAService

type TAAService struct {
	// contains filtered or unexported fields
}

func NewTrustAnchorAttestationService

func NewTrustAnchorAttestationService(cfg *config.Config, db *leveldb.DB, pmc IPlanetmintClient) *TAAService

func (*TAAService) GetRouter added in v0.3.0

func (s *TAAService) GetRouter() *gin.Engine

func (*TAAService) GetRoutes

func (s *TAAService) GetRoutes() gin.RoutesInfo

func (*TAAService) Run

func (s *TAAService) Run() (err error)

Jump to

Keyboard shortcuts

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