types

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2022 License: BSD-2-Clause, MIT, MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ByIdRequest

type ByIdRequest struct {
	ID int `json:"id"`
}

type HttpURL

type HttpURL struct {
	gorm.Model
	URL      string `json:"url"`      // https://acme.com/baseline/update/1/collection.tar.gz/md5 ->
	Filename string `json:"filename"` // /acme.com/baseline_update_1_collection.tar.gz_md5
}

type Job

type Job struct {
	gorm.Model
	URL      string         `json:"url"`
	Path     string         `json:"path"`
	Status   int            `json:"status"`
	Commands chan int       `gorm:"-" json:"-"`
	Command  int            `gorm:"-"`
	Progress Progress       `gorm:"-"`
	Callback func(job *Job) `gorm:"-" json:"-"`
}

type NameValue

type NameValue struct {
	Name  string `json:"Name"`
	Value string `json:"value"`
}

type Progress

type Progress struct {
	ID           int    `json:"repositoryid"`
	Error        error  `json:"-"`
	ErrorMessage string `json:"error"`
	Current      Total  `json:"current"`
	Total        Total  `json:"total"`
	CurrentPath  string `json:"currentpath"`
}

type Repository

type Repository struct {
	ID          int       `json:"id"`
	FailureMsg  string    `json:"failuremsg"`
	LastSuccess time.Time `json:"lastsuccess"`
	LastFailure time.Time `json:"lastfailure"`
	Type        string    `json:"type"`
	URL         string    `json:"url"`
	MatchURL    string    `json:"matchurl"`
	Hash        string    `json:"hash"`
	Method      string    `json:"method"`
	Headers     string    `json:"headers"`
	Recursive   bool      `json:"recursive"`
	Host        string    `json:"host"`
	OuterPath   string    `json:"outerpath"`
	InnerPath   string    `json:"innerpath"`
	Username    string    `json:"username"`
	Password    string    `json:"password"`
	Anonymous   bool      `json:"anonymous"`
	Available   bool      `json:"available"`
}

type RepositoryX

type RepositoryX struct {
	gorm.Model
	Name        string    `json:"name"`
	URL         string    `json:"url"`
	Path        string    `json:"path"`
	Username    string    `json:"username"`
	Password    string    `json:"password"`
	Status      int       `json:"status"`
	Interval    int       `json:"interval"`
	LastSuccess time.Time `json:"lastsuccess"`
	LastFail    time.Time `json:"lastfail"`
	Available   bool      `json:"available"`
	Recursive   bool      `json:"recursive"`
}

type Response

type Response struct {
	Success bool   `json:"success"`
	Error   error  `json:"error"`
	Message string `json:"message"`
}

type Total

type Total struct {
	Percent float64 `json:"percent"`
	Size    int64   `json:"size"`
	Total   int64   `json:"total"`
}

type WaitRequest

type WaitRequest struct {
	URL     string      `json:"url"`
	Method  string      `json:"method"`
	Headers []NameValue `json:"headers"`
	Body    string      `json:"body"`
	NoScan  bool        `json:"noscan"`
}

type WaitResponse

type WaitResponse struct {
	Success  bool        `json:"success"`
	Error    error       `json:"error"`
	Filename string      `json:"filename"`
	Headers  []NameValue `json:"headers"`
}

Jump to

Keyboard shortcuts

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