roza

package
v1.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 22, 2018 License: MIT Imports: 21 Imported by: 1

Documentation

Index

Constants

View Source
const (
	EMPTY                       = "empty"
	ROZA_ONLY                   = "rozaOnly"
	ROZA_KM_ONLY                = "rozaKmOnly"
	ROZA_MDB_ONLY               = "rozaMdbOnly"
	PERFECT_STRIKE              = "perfectStrike"
	PERFECT_STRIKE_MDB_HAS_MORE = "perfectStrikeMdbHasMore"
	ALL_IN_NO_UNIT              = "allInNoUnit"
	ALL_IN_MISSING_UNIT         = "allInMissingUnit"
	ALL_IN_TOO_MANY_UNITS       = "allInTooManyUnits"
	MIXED                       = "mixed"
	MDB_ONLY                    = "mdbOnly"
	ALL_IN_TOO_MANY_FOLDERS     = "allInTooManyFolders"
)

Variables

This section is empty.

Functions

func Init

func Init() time.Time

func LoadIndex

func LoadIndex()

func MatchDirectories

func MatchDirectories()

func MatchFiles

func MatchFiles()

func MatchUnits

func MatchUnits()

func PrepareUpoad

func PrepareUpoad()

func Shutdown

func Shutdown()

Types

type IdxDirDiff

type IdxDirDiff struct {
	Path       string         `json:"path"`
	Files      []*IdxFileDiff `json:"files,omitempty"`
	ExtraFiles []*IdxFileDiff `json:"extraFiles,omitempty"`
	// contains filtered or unexported fields
}

type IdxDirectory

type IdxDirectory struct {
	Name     string
	Parent   *IdxDirectory
	Children *treemap.Map
	Files    []*IdxFile
}

func NewIdxDirectory

func NewIdxDirectory(name string, parent *IdxDirectory) *IdxDirectory

type IdxFile

type IdxFile struct {
	Name         string
	SHA1         string
	Size         int64
	LastModified time.Time
	Directory    *IdxDirectory
}

func (*IdxFile) MarshalJSON

func (f *IdxFile) MarshalJSON() ([]byte, error)

type IdxFileDiff

type IdxFileDiff struct {
	Name    string `json:"name"`
	SHA1    string `json:"-"`
	MdbID   int64  `json:"mdbID,omitempty"`
	MdbCUID int64  `json:"mdbCUID,omitempty"`
	KmID    int    `json:"kmID,omitempty"`
	KmCnIDs []int  `json:"kmCnIDs,omitempty"`
}

type KFile

type KFile struct {
	Copies []*MiniKFile `json:"c,omitempty"`
	// contains filtered or unexported fields
}

type MDBFileDiff

type MDBFileDiff struct {
	MdbName  string     `json:"name"`
	MdbID    int64      `json:"mdbID"`
	MdbCUID  int64      `json:"mdbCUID,omitempty"`
	KmID     int        `json:"kmID,omitempty"`
	KmCnIDs  []int      `json:"kmCnIDs,omitempty"`
	IdxFiles []*IdxFile `json:"directories,omitempty"`
}

type MFile

type MFile struct {
	ID        int64  `json:"id"`
	Name      string `json:"n"`
	CUID      int64  `json:"cuid,omitempty"`
	Published bool   `json:"p"`
	// contains filtered or unexported fields
}

type MasterFile

type MasterFile struct {
	MDB    *MFile `json:"m,omitempty"`
	KMedia *KFile `json:"k,omitempty"`
	Roza   *RFile `json:"r,omitempty"`
	// contains filtered or unexported fields
}

type MatchAnalysis

type MatchAnalysis map[string][]*IdxDirDiff

type MiniKFile

type MiniKFile struct {
	ID    int    `json:"id"`
	Name  string `json:"n"`
	CnIDs []int  `json:"cnIDs,omitempty"`
}

type MiniKMFile

type MiniKMFile struct {
	ID    int
	Sha1  string
	CnIDs []int
}

type RFile

type RFile struct {
	Copies []*IdxFile `json:"c,omitempty"`
	// contains filtered or unexported fields
}

type RozaIndex

type RozaIndex struct {
	Roots     map[string]*IdxDirectory
	FileCount int
}

func (*RozaIndex) GetDir

func (idx *RozaIndex) GetDir(path string) *IdxDirectory

func (*RozaIndex) Load

func (idx *RozaIndex) Load(db *sql.DB) error

func (*RozaIndex) Sha1Map

func (idx *RozaIndex) Sha1Map() map[string][]*IdxFile

type UnitAnalysis

type UnitAnalysis map[string][]*UnitDiff

type UnitDiff

type UnitDiff struct {
	CUID int64 `json:"cuID"`

	Files []*MDBFileDiff `json:"files"`
	// contains filtered or unexported fields
}

type UploadFile

type UploadFile struct {
	IdxFile  *IdxFile
	KmCnID   int
	KmCnName string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL