Documentation ¶
Index ¶
- Constants
- func AllPublicKeys(channel bcgo.Channel, cache bcgo.Cache, network bcgo.Network) (map[string]*rsa.PublicKey, error)
- func CreateAliasRecord(alias string, publicKeyFormat cryptogo.PublicKeyFormat, publicKey []byte, ...) (*bcgo.Record, error)
- func CreateSignedAliasRecord(account bcgo.Account) (*bcgo.Record, error)
- func IterateAliases(channel bcgo.Channel, cache bcgo.Cache, network bcgo.Network, ...) error
- func OpenAliasChannel() bcgo.Channel
- func PublicKeyForAlias(channel bcgo.Channel, cache bcgo.Cache, network bcgo.Network, alias string) (*rsa.PublicKey, error)
- func PublicKeysForAliases(channel bcgo.Channel, cache bcgo.Cache, network bcgo.Network, aliases []string) (access []bcgo.Identity)
- func Register(node bcgo.Node, listener bcgo.MiningListener) error
- func RegisterAlias(host string, account bcgo.Account) error
- func UniqueAlias(channel bcgo.Channel, cache bcgo.Cache, network bcgo.Network, alias string) error
- func ValidateAlias(alias string) error
- type Alias
- func (*Alias) Descriptor() ([]byte, []int)
- func (m *Alias) GetAlias() string
- func (m *Alias) GetPublicFormat() cryptogo.PublicKeyFormat
- func (m *Alias) GetPublicKey() []byte
- func (*Alias) ProtoMessage()
- func (m *Alias) Reset()
- func (m *Alias) String() string
- func (m *Alias) XXX_DiscardUnknown()
- func (m *Alias) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Alias) XXX_Merge(src proto.Message)
- func (m *Alias) XXX_Size() int
- func (m *Alias) XXX_Unmarshal(b []byte) error
- type AliasValidator
- type ErrAliasAlreadyRegistered
- type ErrAliasInvalid
- type ErrAliasNotFound
- type ErrAliasNotPublic
- type ErrAliasTooLong
- type ErrAliasTooShort
- type ErrPublicKeyNotFound
Constants ¶
View Source
const ( ALIAS = "Alias" ALIAS_THRESHOLD = bcgo.THRESHOLD_G MAX_ALIAS_LENGTH = 100 MIN_ALIAS_LENGTH = 1 )
Variables ¶
This section is empty.
Functions ¶
func AllPublicKeys ¶ added in v1.1.6
func CreateAliasRecord ¶
func CreateAliasRecord(alias string, publicKeyFormat cryptogo.PublicKeyFormat, publicKey []byte, signatureAlgorithm cryptogo.SignatureAlgorithm, signature []byte) (*bcgo.Record, error)
func CreateSignedAliasRecord ¶
func IterateAliases ¶
func OpenAliasChannel ¶
func PublicKeyForAlias ¶ added in v1.2.0
func PublicKeysForAliases ¶ added in v1.2.0
func UniqueAlias ¶
func ValidateAlias ¶
Validates alias is the correct length and all characters are in the set [a-zA-Z0-9.-_]
Types ¶
type Alias ¶
type Alias struct { Alias string `protobuf:"bytes,1,opt,name=alias,proto3" json:"alias,omitempty"` PublicKey []byte `protobuf:"bytes,2,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` PublicFormat cryptogo.PublicKeyFormat `` /* 126-byte string literal not displayed */ XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func AliasForKey ¶ added in v1.2.0
func (*Alias) Descriptor ¶
func (*Alias) GetPublicFormat ¶
func (m *Alias) GetPublicFormat() cryptogo.PublicKeyFormat
func (*Alias) GetPublicKey ¶
func (*Alias) ProtoMessage ¶
func (*Alias) ProtoMessage()
func (*Alias) XXX_DiscardUnknown ¶
func (m *Alias) XXX_DiscardUnknown()
func (*Alias) XXX_Marshal ¶
func (*Alias) XXX_Unmarshal ¶
type AliasValidator ¶
type AliasValidator struct { }
type ErrAliasAlreadyRegistered ¶ added in v1.2.1
type ErrAliasAlreadyRegistered struct {
Alias string
}
ErrAliasAlreadyRegistered is returned if the alias being registered is already taken.
func (ErrAliasAlreadyRegistered) Error ¶ added in v1.2.1
func (e ErrAliasAlreadyRegistered) Error() string
type ErrAliasInvalid ¶ added in v1.2.1
type ErrAliasInvalid struct {
Alias string
}
ErrAliasInvalid is returned when the alias includes unsupported characters.
func (ErrAliasInvalid) Error ¶ added in v1.2.1
func (e ErrAliasInvalid) Error() string
type ErrAliasNotFound ¶ added in v1.2.1
type ErrAliasNotFound struct { }
ErrAliasNotFound is returned if the alias cannot be found.
func (ErrAliasNotFound) Error ¶ added in v1.2.1
func (e ErrAliasNotFound) Error() string
type ErrAliasNotPublic ¶ added in v1.2.1
type ErrAliasNotPublic struct { }
ErrAliasNotPublic is returned when registering an encrypted alias.
func (ErrAliasNotPublic) Error ¶ added in v1.2.1
func (e ErrAliasNotPublic) Error() string
type ErrAliasTooLong ¶ added in v1.2.1
type ErrAliasTooLong struct {
Size, Max int
}
ErrAliasTooLong is returned when the alias is too long.
func (ErrAliasTooLong) Error ¶ added in v1.2.1
func (e ErrAliasTooLong) Error() string
type ErrAliasTooShort ¶ added in v1.2.1
type ErrAliasTooShort struct {
Size, Min int
}
ErrAliasTooShort is returned when the alias is too short.
func (ErrAliasTooShort) Error ¶ added in v1.2.1
func (e ErrAliasTooShort) Error() string
type ErrPublicKeyNotFound ¶ added in v1.2.1
type ErrPublicKeyNotFound struct {
Alias string
}
ErrPublicKeyNotFound is return if the public key cannot be found.
func (ErrPublicKeyNotFound) Error ¶ added in v1.2.1
func (e ErrPublicKeyNotFound) Error() string
Click to show internal directories.
Click to hide internal directories.