Documentation
¶
Index ¶
Constants ¶
View Source
const ( // LockIdle unlock LockIdle lockType = 0b0000 // LockReader reader lock type LockReader lockType = 0b0001 // LockWriter writer lock type LockWriter lockType = 0b0010 // LockRWriter reader and writer lock type LockRWriter lockType = LockReader | LockWriter )
View Source
const ( // ObjectLockFile lock file path ObjectLockFile = ".git-syncer/lockfile" // ObjectHeadLinkFile head log file path ObjectHeadLinkFile = ".git-syncer/head" // ObjectLogDir log dir path ObjectLogDir = ".git-syncer/logs" )
View Source
const JSONTimeLayout = time.RFC3339
JSONTimeLayout time format
Variables ¶
This section is empty.
Functions ¶
func AsOssError ¶
func AsOssError(err error) *oss.ServiceError
AsOssError try to convert to oss service error
func IsObjectNotFoundErr ¶
IsObjectNotFoundErr object not found err
func NewContrib ¶
NewContrib create alioss contrib
func NewContribFactory ¶
NewContribFactory create alioss contrib factory
Types ¶
type Alioss ¶
type Alioss struct {
// contains filtered or unexported fields
}
Alioss alioss contrib
func (*Alioss) GetHeadSHA1 ¶
GetHeadSHA1 get head sha1 from alioss contrib
type JSONTime ¶
JSONTime jsonable of time.Time
func (JSONTime) MarshalJSON ¶
MarshalJSON stringify from time.Time
func (JSONTime) UnmarshalJSON ¶
UnmarshalJSON parse to time.Time
type LockInfo ¶
type LockInfo struct {
Mutex lockType `json:"Mutex"`
Date JSONTime `json:"Date"`
Locker string `json:"Locker"`
LockID string `json:"LockID"`
WLockSHA1 string `json:"WLockSHA1"`
}
LockInfo lock info
type LogInfo ¶
type LogInfo struct {
SHA1 string `json:"SHA1"`
RefSHA1 string `json:"RefSHA1"`
Executor string `json:"Executor"`
Date JSONTime `json:"Date"`
Uploaded []UploadedFile `json:"Uploaded"`
Deleted []string `json:"Deleted"`
}
LogInfo log info
type Options ¶
type Options struct {
repository.ConfigReader
}
Options alioss Options
func (*Options) AccessKeyID ¶
AccessKeyID access key id options
func (*Options) AccessKeySecret ¶
AccessKeySecret access key secret options
type UploadedFile ¶
type UploadedFile struct {
Path string `json:"Path"`
Size int64 `json:"Size"`
SHA1 string `json:"SHA1"`
}
UploadedFile uploaded file to log
Source Files
¶
Click to show internal directories.
Click to hide internal directories.