Documentation ¶
Index ¶
Constants ¶
View Source
const ( INDEX = iota CHUNK )
Variables ¶
This section is empty.
Functions ¶
func RemoveOldCache ¶ added in v1.0.4
RemoveOldCache remove old cache after max time exists
Types ¶
type Chunk ¶
type Index ¶
type Node ¶
type Node struct { Name string `json:"name"` Type string `json:"type"` Sha256Hash Sha256Hash `json:"sha256_hash,omitempty"` Mode os.FileMode `json:"mode,omitempty"` ModTime time.Time `json:"mtime,omitempty"` AccessTime time.Time `json:"atime,omitempty"` ChangeTime time.Time `json:"ctime,omitempty"` UID uint32 `json:"uid"` GID uint32 `json:"gid"` User string `json:"user,omitempty"` Group string `json:"group,omitempty"` Size uint64 `json:"size,omitempty"` LinkTarget string `json:"linktarget,omitempty"` Content []*ChunkInfo `json:"content,omitempty"` AbsolutePath string `json:"path"` BasePath string `json:"base_path"` RelativePath string `json:"relative_path"` }
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
func NewRepository ¶
func NewRepository(path string, mcID string, rpID string) (*Repository, error)
NewDirRepository creates a new dir-baked repository at the given path.
func (*Repository) SaveChunk ¶
func (r *Repository) SaveChunk(chunk *Chunk) error
func (*Repository) SaveIndex ¶
func (r *Repository) SaveIndex(index *Index) error
type Sha256Hash ¶
type Sha256Hash []byte
func (Sha256Hash) MarshalJSON ¶
func (h Sha256Hash) MarshalJSON() ([]byte, error)
func (Sha256Hash) String ¶
func (h Sha256Hash) String() string
func (*Sha256Hash) UnmarshalJSON ¶
func (h *Sha256Hash) UnmarshalJSON(b []byte) error
Click to show internal directories.
Click to hide internal directories.