Documentation ¶
Index ¶
- Constants
- func IsReservedName(domainName string) bool
- func IsValidDomainName(domainName string) bool
- func IsValidObjectName(objectName string) bool
- type ByteDecodeFunc
- type ByteDecoderFactory
- type ByteEncodeFunc
- type DecoderOptions
- type Encoder
- type EncoderOptions
- type Global
- func (v *Global) AsByteString() longbits.ByteString
- func (v *Global) AsBytes() []byte
- func (v Global) Bytes() []byte
- func (v *Global) CheckParity(bytes []byte) error
- func (v Global) Compare(other Global) int
- func (v Global) Encode(enc Encoder) string
- func (v Global) Equal(other Global) bool
- func (v Global) GetBase() *Local
- func (v Global) GetLocal() *Local
- func (v *Global) GetParity() []byte
- func (v *Global) GetScope() Scope
- func (v Global) IsEmpty() bool
- func (v *Global) IsGlobalScope() bool
- func (v *Global) IsLifelineScope() bool
- func (v *Global) IsLocalDomainScope() bool
- func (v *Global) IsObjectReference() bool
- func (v *Global) IsRecordScope() bool
- func (v *Global) IsSelfScope() bool
- func (v Global) Marshal() ([]byte, error)
- func (v Global) MarshalBinary() ([]byte, error)
- func (v *Global) MarshalJSON() ([]byte, error)
- func (v Global) MarshalTo(data []byte) (int, error)
- func (v *Global) Read(p []byte) (int, error)
- func (v Global) Size() int
- func (v Global) String() string
- func (v *Global) Unmarshal(data []byte) error
- func (v *Global) UnmarshalBinary(data []byte) error
- func (v *Global) UnmarshalJSON(data []byte) error
- func (v *Global) WriteTo(w io.Writer) (int64, error)
- type GlobalDecoder
- type IdentityDecoder
- type IdentityEncoder
- type Local
- func (v *Local) AsByteString() longbits.ByteString
- func (v *Local) AsBytes() []byte
- func (v *Local) AsReader() io.ByteReader
- func (v Local) Bytes() []byte
- func (v Local) Compare(other Local) int
- func (v *Local) DebugString() string
- func (v Local) Encode(enc Encoder) string
- func (v *Local) Equal(other Local) bool
- func (v Local) GetHash() longbits.Bits224
- func (v Local) GetPulseNumber() pulse.Number
- func (v Local) Hash() []byte
- func (v Local) IsEmpty() bool
- func (v Local) Marshal() ([]byte, error)
- func (v Local) MarshalBinary() ([]byte, error)
- func (v *Local) MarshalJSON() ([]byte, error)
- func (v Local) MarshalTo(data []byte) (int, error)
- func (v Local) NotEmpty() bool
- func (v Local) Pulse() pulse.Number
- func (v *Local) Read(p []byte) (n int, err error)
- func (v Local) Size() int
- func (v Local) String() string
- func (v *Local) Unmarshal(data []byte) error
- func (v *Local) UnmarshalBinary(data []byte) error
- func (v *Local) UnmarshalJSON(data []byte) error
- func (v *Local) WriteTo(w io.Writer) (int64, error)
- type Scope
Constants ¶
View Source
const ( LocalBinaryHashSize = 28 LocalBinaryPulseAndScopeSize = 4 LocalBinarySize = LocalBinaryPulseAndScopeSize + LocalBinaryHashSize GlobalBinarySize = 2 * LocalBinarySize )
View Source
const JetDepthPosition = 0
View Source
const LegacyDomainName = "11111111111111111111111111111111"
View Source
const RecordDomainName = "record"
View Source
const SubScopeMask = 0x03
View Source
const SuperScopeMask = 0x0C
Variables ¶
This section is empty.
Functions ¶
func IsReservedName ¶
func IsValidDomainName ¶
func IsValidObjectName ¶
Types ¶
type ByteDecodeFunc ¶
type ByteDecodeFunc func(s string, target io.ByteWriter) (stringRead int, err error)
type ByteDecoderFactory ¶
type ByteDecoderFactory interface { GetByteDecoder(encodingName string) ByteDecodeFunc DefaultDecoder() ByteDecodeFunc LegacyDecoder() ByteDecodeFunc }
func NewByteDecoderFactory ¶
func NewByteDecoderFactory() ByteDecoderFactory
type ByteEncodeFunc ¶
type ByteEncodeFunc func(source io.ByteReader, builder *strings.Builder) error
type DecoderOptions ¶
type DecoderOptions uint8
const ( AllowLegacy DecoderOptions = 1 << iota AllowRecords IgnoreParity )
type Encoder ¶
type Encoder interface { Encode(ref *Global) (string, error) EncodeToBuilder(ref *Global, b *strings.Builder) error EncodeRecord(rec *Local) (string, error) }
func Base58Encoder ¶ added in v0.9.17
func Base58Encoder() Encoder
func DefaultEncoder ¶
func DefaultEncoder() Encoder
func NewBase58Encoder ¶
func NewBase58Encoder(opts EncoderOptions) Encoder
func NewBase64Encoder ¶
func NewBase64Encoder(opts EncoderOptions) Encoder
type EncoderOptions ¶
type EncoderOptions uint8
const ( Parity EncoderOptions = 1 << iota EncodingSchema FormatSchema NilRef = "<nil>" // non-parsable SchemaV1 = "insolar" )
type Global ¶
type Global struct {
// contains filtered or unexported fields
}
func NewRecordRef ¶
For LIMITED USE ONLY - can only be used by observer/analytical code
func NewSelfRef ¶
func (*Global) AsByteString ¶
func (v *Global) AsByteString() longbits.ByteString
func (*Global) CheckParity ¶
func (*Global) IsGlobalScope ¶
func (*Global) IsLifelineScope ¶
func (*Global) IsLocalDomainScope ¶
func (*Global) IsObjectReference ¶ added in v0.9.1
func (*Global) IsRecordScope ¶
func (*Global) IsSelfScope ¶
func (Global) MarshalBinary ¶
func (*Global) MarshalJSON ¶
MarshalJSON serializes reference into JSONFormat.
func (*Global) UnmarshalBinary ¶
func (*Global) UnmarshalJSON ¶
type GlobalDecoder ¶
func DefaultDecoder ¶
func DefaultDecoder() GlobalDecoder
func NewDecoder ¶
func NewDecoder(options DecoderOptions, factory ByteDecoderFactory) GlobalDecoder
func NewDefaultDecoder ¶
func NewDefaultDecoder(options DecoderOptions) GlobalDecoder
type IdentityDecoder ¶
type IdentityEncoder ¶
type Local ¶
type Local struct {
// contains filtered or unexported fields
}
func (*Local) AsByteString ¶
func (v *Local) AsByteString() longbits.ByteString
func (*Local) AsReader ¶
func (v *Local) AsReader() io.ByteReader
func (*Local) DebugString ¶
DebugString prints ID in human readable form.
func (Local) GetPulseNumber ¶
func (Local) MarshalBinary ¶
func (*Local) MarshalJSON ¶
MarshalJSON serializes ID into JSONFormat
func (*Local) UnmarshalBinary ¶
func (*Local) UnmarshalJSON ¶
type Scope ¶
type Scope uint8
const ( LifelineRecordOrSelf Scope = LifelineSuperScope + iota LifelinePrivateChild LifelinePublicChild LifelineDelegate )
const ( LocalDomainMember Scope = LocalDomainSuperScope + iota LocalDomainPrivatePolicy LocalDomainPublicPolicy )
const ( RemoteDomainMember Scope = GlobalSuperScope + iota GlobalDomainPublicPolicy GlobalDomainMember )
func (Scope) IsOfLifeline ¶
func (Scope) IsOfLocalDomain ¶
Click to show internal directories.
Click to hide internal directories.