Documentation
¶
Index ¶
- Constants
- Variables
- func NewSpaceId(id string, repKey uint64) string
- func StoragePayloadForSpaceCreate(payload SpaceCreatePayload) (storagePayload spacestorage.SpaceStorageCreatePayload, err error)
- func StoragePayloadForSpaceDerive(payload SpaceDerivePayload) (storagePayload spacestorage.SpaceStorageCreatePayload, err error)
- func ValidateSpaceHeader(rawHeaderWithId *spacesyncproto.RawSpaceHeaderWithId, identity crypto.PubKey) (err error)
- func ValidateSpaceStorageCreatePayload(payload spacestorage.SpaceStorageCreatePayload) (err error)
- type SpaceCreatePayload
- type SpaceDerivePayload
Constants ¶
View Source
const (
SpaceReserved = "any-sync.space"
)
Variables ¶
View Source
var ErrIncorrectIdentity = errors.New("incorrect identity")
Functions ¶
func NewSpaceId ¶
func StoragePayloadForSpaceCreate ¶
func StoragePayloadForSpaceCreate(payload SpaceCreatePayload) (storagePayload spacestorage.SpaceStorageCreatePayload, err error)
func StoragePayloadForSpaceDerive ¶
func StoragePayloadForSpaceDerive(payload SpaceDerivePayload) (storagePayload spacestorage.SpaceStorageCreatePayload, err error)
func ValidateSpaceHeader ¶
func ValidateSpaceHeader(rawHeaderWithId *spacesyncproto.RawSpaceHeaderWithId, identity crypto.PubKey) (err error)
func ValidateSpaceStorageCreatePayload ¶
func ValidateSpaceStorageCreatePayload(payload spacestorage.SpaceStorageCreatePayload) (err error)
Types ¶
type SpaceCreatePayload ¶
type SpaceCreatePayload struct {
// SigningKey is the signing key of the owner
SigningKey crypto.PrivKey
// SpaceType is an arbitrary string
SpaceType string
// ReplicationKey is a key which is to be used to determine the node where the space should be held
ReplicationKey uint64
// SpacePayload is an arbitrary payload related to space type
SpacePayload []byte
// MasterKey is the master key of the owner
MasterKey crypto.PrivKey
// ReadKey is the first read key of space
ReadKey crypto.SymKey
// MetadataKey is the first metadata key of space
MetadataKey crypto.PrivKey
// Metadata is the metadata of the owner
Metadata []byte
}
Click to show internal directories.
Click to hide internal directories.