Documentation ¶
Index ¶
- Constants
- Variables
- func Execute()
- func GetBody(url string) (body []byte, err error)
- func Test(ctx *Context) (err error)
- type CDN
- type ChangeAction
- type Changes
- type Config
- type Context
- func (ctx *Context) SyncComposerPhar(processName string)
- func (ctx *Context) SyncDists(processName string)
- func (ctx *Context) SyncDistsRetry(processName string)
- func (ctx *Context) SyncPackagesJsonFile(processName string)
- func (ctx *Context) SyncPackagesV1(processName string)
- func (ctx *Context) SyncPackagesV2(processName string)
- func (ctx *Context) SyncProvider(processName string)
- func (ctx *Context) SyncStatus(processName string)
- func (ctx *Context) SyncV2(processName string)
- type Dist
- type Github
- type GithubError
- type Hashes
- type Mirror
- type MyLogger
- type Package
- type PackageDist
- type Packages
- type Packagist
- func (packagist *Packagist) Get(path string) (content []byte, err error)
- func (packagist *Packagist) GetAllPackages() (content []byte, err error)
- func (packagist *Packagist) GetInitTimestamp() (timestamp string, err error)
- func (packagist *Packagist) GetMetadataChanges(lastTimestamp string) (changes Changes, err error)
- func (packagist *Packagist) GetPackage(packageName string) (content []byte, err error)
- func (packagist *Packagist) GetPackagesJSON() (body []byte, lastModified string, err error)
- type Providers
- type Response
- type Stable
- type Task
Constants ¶
View Source
const Github404 = GithubError("github: 404")
Variables ¶
View Source
var ( // Wg Concurrency control Wg sync.WaitGroup )
Functions ¶
Types ¶
type ChangeAction ¶
type ChangeAction struct { Type string `json:"type"` Package string `json:"package"` Time int `json:"time"` }
func NewChangeAction ¶
func NewChangeAction(type_ string, packageName string, time int) *ChangeAction
func NewChangeActionFromJSONString ¶
func NewChangeActionFromJSONString(jsonString string) (action *ChangeAction, err error)
func (*ChangeAction) ToJSONString ¶
func (action *ChangeAction) ToJSONString() string
type Changes ¶
type Changes struct { Timestamp int `json:"timestamp"` Actions []ChangeAction `json:"actions"` }
type Config ¶
type Config struct { UserAgent string `yaml:"USER_AGENT"` RedisAddr string `yaml:"REDIS_ADDR"` RedisPassword string `yaml:"REDIS_PASSWORD"` RedisDB int `yaml:"REDIS_DB"` OSSAccessKeyID string `yaml:"OSS_ACCESS_KEY_ID"` OSSAccessKeySecret string `yaml:"OSS_ACCESS_KEY_SECRET"` OSSEndpoint string `yaml:"OSS_ENDPOINT"` OSSBucket string `yaml:"OSS_BUCKET"` GithubToken string `yaml:"GITHUB_TOKEN"` MirrorUrl string `yaml:"MIRROR_URL"` RepoUrl string `yaml:"REPO_URL"` ApiUrl string `yaml:"API_URL"` ProviderUrl string `yaml:"PROVIDER_URL"` DistUrl string `yaml:"DIST_URL"` BuildCache string `yaml:"BUILD_CACHE"` ApiIterationInterval int `yaml:"API_ITERATION_INTERVAL"` }
Config Mirror Config
func LoadConfig ¶
func (*Config) ValidateConfig ¶
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
func NewContext ¶
func (*Context) SyncComposerPhar ¶
func (*Context) SyncDistsRetry ¶
func (*Context) SyncPackagesJsonFile ¶
func (*Context) SyncPackagesV1 ¶
func (*Context) SyncPackagesV2 ¶
func (*Context) SyncProvider ¶
func (*Context) SyncStatus ¶
type GithubError ¶
type GithubError string
func (GithubError) Error ¶
func (e GithubError) Error() string
type Package ¶
type Package struct { Name string `json:"name"` Dist PackageDist `json:"dist"` }
type PackageDist ¶
type Packagist ¶
type Packagist struct {
// contains filtered or unexported fields
}
func NewPackagist ¶
func (*Packagist) GetAllPackages ¶
func (*Packagist) GetInitTimestamp ¶
func (*Packagist) GetMetadataChanges ¶
func (*Packagist) GetPackage ¶
type Providers ¶
Click to show internal directories.
Click to hide internal directories.