platform

package
v0.0.0-...-d7fecdb Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsErrorTooManyFilesToDelete

func IsErrorTooManyFilesToDelete(err error) bool

helper

func NewErrorTooManyFilesToDelete

func NewErrorTooManyFilesToDelete(err error) errorTooManyFilesToDelete

Types

type RepoDir

type RepoDir struct {
	RepoName domain.ResourceName
	Path     domain.Directory
}

type RepoDirFile

type RepoDirFile struct {
	RepoName domain.ResourceName
	Dir      domain.Directory
	File     domain.FilePath
}

type RepoDirInfo

type RepoDirInfo struct {
	RepoDir
	RepoId string
}

type RepoFile

type RepoFile interface {
	List(u *UserInfo, d *RepoDir) ([]RepoPathItem, error)
	Create(u *UserInfo, f *RepoFileInfo, content *RepoFileContent) error
	Update(u *UserInfo, f *RepoFileInfo, content *RepoFileContent) error
	Delete(u *UserInfo, f *RepoFileInfo) error
	DeleteDir(u *UserInfo, f *RepoDirInfo) error
	Download(token string, f *RepoFileInfo) (data []byte, notFound bool, err error)
	IsLFSFile(data []byte) (is bool, sha string)
	GenLFSDownloadURL(sha string) (string, error)
	GetDirFileInfo(u *UserInfo, d *RepoDirFile) (sha string, exist bool, err error)
	DownloadRepo(u *UserInfo, repoId string, handle func(io.Reader, int64)) error
}

type RepoFileContent

type RepoFileContent struct {
	Content   *string
	IsEncoded bool
}

func (*RepoFileContent) IsOverSize

func (r *RepoFileContent) IsOverSize() bool

type RepoFileInfo

type RepoFileInfo struct {
	//Namespace string
	RepoId string
	Path   domain.FilePath
}

func (*RepoFileInfo) BlacklistFilter

func (r *RepoFileInfo) BlacklistFilter() bool

type RepoOption

type RepoOption struct {
	Name     domain.ResourceName
	RepoType domain.RepoType
}

func (*RepoOption) IsNotEmpty

func (r *RepoOption) IsNotEmpty() bool

type RepoPathItem

type RepoPathItem struct {
	Path      string `json:"path"`
	Name      string `json:"name"`
	IsDir     bool   `json:"is_dir"`
	IsLFSFile bool   `json:"is_lfs_file"`
}

type Repository

type Repository interface {
	New(repo *RepoOption) (string, error)
	Delete(string) error
	Fork(srcRepoId string, Name domain.ResourceName) (string, error)
	Update(repoId string, repo *RepoOption) error
}

type UserInfo

type UserInfo struct {
	User  domain.Account
	Email domain.Email
	Token string
}

type UserOption

type UserOption struct {
	Name     domain.Account
	Email    domain.Email
	Password domain.Password
}

Jump to

Keyboard shortcuts

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