Documentation ¶
Index ¶
Constants ¶
View Source
const (
AdminAccountID = "00000000-0000-0000-0000-000000000000"
)
Variables ¶
View Source
var ( ErrNoStorageObjectFound = errors.New("no storage object found") ErrTooManyStorageObjectsFound = errors.New("too many storage objects found") )
Functions ¶
This section is empty.
Types ¶
type AsymmetricSigner ¶
type AsymmetricSigner interface { AsymmetricSign(context.Context, *kmspb.AsymmetricSignRequest, ...gax.CallOption) ( *kmspb.AsymmetricSignResponse, error, ) GetPublicKey(context.Context, *kmspb.GetPublicKeyRequest, ...gax.CallOption) (*kmspb.PublicKey, error) }
AsymmetricSigner is implemented by the kms.KeyManagementClient and it mainly exists so that testing can be easily done via a fake version of the kms service.
type NonceManager ¶
type NonceManager interface { SetNonce(ctx context.Context, nonce uint64) error IncNonce(ctx context.Context) (nonce uint64, err error) }
func NewNakamaNonceManager ¶
func NewNakamaNonceManager(nk runtime.NakamaModule) NonceManager
type Signer ¶
type Signer interface { SignTx(ctx context.Context, personaTag string, namespace string, data any) (*sign.Transaction, error) SignSystemTx(ctx context.Context, namespace string, data any) (*sign.Transaction, error) SignerAddress() string }
func NewKMSSigner ¶
func NewKMSSigner(ctx context.Context, nonceManager NonceManager, asymmetricSigner AsymmetricSigner, keyName string) ( Signer, error, )
func NewNakamaSigner ¶
func NewNakamaSigner(ctx context.Context, logger runtime.Logger, nk runtime.NakamaModule, nonceManager NonceManager) ( Signer, error, )
Click to show internal directories.
Click to hide internal directories.