model

package
v0.0.0-...-97c84cb Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChangeCommitter

type ChangeCommitter interface {
	CommitAdd(changeId string, changed HashedFile) error
	CommitDelete(changeId string, changed HashedFile) error
}

type ChangeIdHolder

type ChangeIdHolder interface {
	ChangeId() string
}

type Changes

type Changes struct {
	Additions []FileAdded
	Deletions []FileDeleted
}

func (*Changes) Append

func (c *Changes) Append(changes Changes)

func (*Changes) Len

func (c *Changes) Len() int

func (*Changes) String

func (c *Changes) String() string

type FileAdded

type FileAdded struct {
	FileWithContent
}

func (FileAdded) String

func (f FileAdded) String() string

type FileDeleted

type FileDeleted struct {
	IdentifiableHashedFile
}

func (FileDeleted) String

func (f FileDeleted) String() string

type FileWithContent

type FileWithContent interface {
	HashedFile
	Content() (io.ReadCloser, error)
	Size() (int64, error)
}

type HashedFile

type HashedFile interface {
	Path() string
	Hash() string
}

type HashedFiles

type HashedFiles map[string]HashedFile

func (HashedFiles) HasFile

func (e HashedFiles) HasFile(path, hash string) bool

func (HashedFiles) Replace

func (e HashedFiles) Replace(file HashedFile)

type IdentifiableHashedFile

type IdentifiableHashedFile interface {
	HashedFile
	ChangeIdHolder
}

type IdentifiableHashedFiles

type IdentifiableHashedFiles map[string]IdentifiableHashedFile

func NewIdentifiableHashedFiles

func NewIdentifiableHashedFiles[E IdentifiableHashedFile](files []E) IdentifiableHashedFiles

func (IdentifiableHashedFiles) HasFile

func (e IdentifiableHashedFiles) HasFile(path, hash string) bool

func (IdentifiableHashedFiles) Replace

Directories

Path Synopsis
Package mock_model is a generated GoMock package.
Package mock_model is a generated GoMock package.

Jump to

Keyboard shortcuts

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