Documentation ¶
Index ¶
- Constants
- func GormOpenRetry(dsn string, opts ...gorm.Option) (*gorm.DB, error)
- type AMServer
- func (s *AMServer) CreateAccount(ctx context.Context, req *ubt_am.CreateAccountRequest) (*ubt_am.CreateAccountResponse, error)
- func (s *AMServer) GetAccount(ctx context.Context, req *ubt_am.GetStoredAccountRequest) (*ubt_am.GetStoredAccountResponse, error)
- func (s *AMServer) ListAccounts(ctx context.Context, req *ubt_am.ListAccountsRequest) (*ubt_am.ListAccountsResponse, error)
- func (s *AMServer) SignPayload(ctx context.Context, req *ubt_am.SignPayloadRequest) (*ubt_am.SignPayloadResponse, error)
- type Account
- type Chacha20poly1305Encryption
- type Encryption
- type NoEncryption
Constants ¶
View Source
const NONCE_SIZE = 24
View Source
const SALT_SIZE = 16
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AMServer ¶
type AMServer struct { ubt_am.UnimplementedUbtAccountManagerServer // contains filtered or unexported fields }
func InitAMServer ¶ added in v0.0.9
func (*AMServer) CreateAccount ¶
func (s *AMServer) CreateAccount(ctx context.Context, req *ubt_am.CreateAccountRequest) (*ubt_am.CreateAccountResponse, error)
func (*AMServer) GetAccount ¶ added in v0.0.4
func (s *AMServer) GetAccount(ctx context.Context, req *ubt_am.GetStoredAccountRequest) (*ubt_am.GetStoredAccountResponse, error)
func (*AMServer) ListAccounts ¶
func (s *AMServer) ListAccounts(ctx context.Context, req *ubt_am.ListAccountsRequest) (*ubt_am.ListAccountsResponse, error)
func (*AMServer) SignPayload ¶
func (s *AMServer) SignPayload(ctx context.Context, req *ubt_am.SignPayloadRequest) (*ubt_am.SignPayloadResponse, error)
type Chacha20poly1305Encryption ¶ added in v0.0.4
type Chacha20poly1305Encryption struct {
Key []byte
}
func (*Chacha20poly1305Encryption) Decrypt ¶ added in v0.0.4
func (enc *Chacha20poly1305Encryption) Decrypt(data []byte) ([]byte, error)
func (*Chacha20poly1305Encryption) Encrypt ¶ added in v0.0.4
func (enc *Chacha20poly1305Encryption) Encrypt(data []byte) ([]byte, error)
func (*Chacha20poly1305Encryption) GetKey ¶ added in v0.0.4
func (enc *Chacha20poly1305Encryption) GetKey() []byte
type Encryption ¶ added in v0.0.4
type Encryption interface { GetKey() []byte Encrypt(data []byte) ([]byte, error) Decrypt(data []byte) ([]byte, error) }
func GetEncryption ¶ added in v0.0.4
func GetEncryption(key []byte) Encryption
type NoEncryption ¶ added in v0.0.4
type NoEncryption struct { }
func (*NoEncryption) Decrypt ¶ added in v0.0.4
func (enc *NoEncryption) Decrypt(data []byte) ([]byte, error)
func (*NoEncryption) Encrypt ¶ added in v0.0.4
func (enc *NoEncryption) Encrypt(data []byte) ([]byte, error)
func (*NoEncryption) GetKey ¶ added in v0.0.4
func (enc *NoEncryption) GetKey() []byte
Click to show internal directories.
Click to hide internal directories.