Documentation
¶
Overview ¶
Package mapping turns index rows into the protos and structs the rest of goback speaks. The generated mapper asserts against Mapper, which would be an import cycle if the interface lived in package sql.
Index ¶
- func Base(p string) []byte
- func KeyID(stored *string) []byte
- func Nanos(t *time.Time) int64
- func NodeType(t uint32) proto.NodeType
- func Open(validUntil *time.Time) bool
- func Owner(stored string) []byte
- func Ref(hash []byte) *proto.Ref
- func SetState(s set.State) proto.SetState
- func Sum(hash []byte) [proto.HashSize]byte
- type Mapper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func KeyID ¶
KeyID is a stored commit key id: nil when the commit records none, empty but not nil when it records a plain commit.
Types ¶
type Mapper ¶
type Mapper interface {
// field:Timestamp method:"Unix"
// field:ReceivedAtNs from:"ReceivedAt" method:"UnixNano"
// field:Tree using:"Ref"
// field:BackupSet from:"Edges.Set.Name"
// field:Parent using:"Ref"
// field:KeyId from:"KeyID" using:"KeyID"
Commit(in *ent.CommitRow) *proto.Commit
// field:Stat from:"."
// field:Ref using:"Ref"
TreeNode(in *ent.File) *proto.TreeNode
// field:Name from:"Path" using:"Base"
// field:User using:"Owner"
// field:Group using:"Owner"
// field:Type using:"NodeType"
FileInfo(in *ent.File) *proto.FileInfo
// field:Ref using:"Ref"
// field:Target using:"Ref"
// field:ReceivedAtNs from:"ReceivedAt" method:"UnixNano"
Pin(in *ent.Pin) *proto.PinInfo
// field:Set from:"BackupSet"
// field:Restore from:"RestoreRef" using:"Ref"
// field:Started from:"StartedAt"
Session(in *ent.Session) *backup.Session
// field:Name from:"ID"
// field:Session from:"SessionID"
// field:Created from:"CreatedAt"
Archive(in *ent.Archive) pack.ArchiveInfo
// field:Archive from:"ArchiveID"
// field:Record from:"."
Location(in *ent.Object) pack.IndexLocation
// field:Sum from:"Ref" using:"Sum"
// field:Offset from:"Start"
Record(in *ent.Object) pack.IndexRecord
Set(in *ent.Set) index.SetInfo
// field:Commit from:"."
// field:Ref using:"Ref"
// field:Files from:"FileCount"
CommitDetail(in *ent.CommitRow) index.CommitDetail
// field:Ref using:"Ref"
// field:Commit from:"."
// field:Size from:"."
// field:DeletedAtNs from:"DeletedAt" using:"Nanos"
// field:ExpiresAtNs from:"ExpiresAt" using:"Nanos"
TrashedCommit(in *ent.CommitRow) *proto.TrashedCommit
// field:LogicalBytes from:"LogicalSize"
// field:Files from:"FileCount"
CommitSize(in *ent.CommitRow) *proto.CommitSize
// field:Node from:"."
// field:From from:"ValidFrom"
Version(in *ent.File) index.Version
// field:Ref using:"Ref"
// field:Set from:"-"
// field:Open from:"ValidUntil" using:"Open"
FilePath(in *ent.File) backup.FilePath
// field:WritePolicy from:"Policy"
// field:WritePolicyVersion from:"PolicyVersion"
// field:KeyAcknowledgedAtNs from:"KeyAcknowledgedAt" using:"Nanos"
// field:DefaultRetention from:"RetentionPolicy"
// field:HoldDays from:"-"
StoreScope(in *ent.Settings) *proto.StoreScope
// field:SetId from:"ID"
// field:Retention from:"RetentionPolicy"
// field:State using:"SetState"
// field:ClosedAtNs from:"-"
SetScope(in *ent.Set) *proto.SetScope
}
mapper:generate
Click to show internal directories.
Click to hide internal directories.