apis

package
v0.0.0-...-9799186 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

go get github.com/fatih/gomodifytags

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Err

type Err struct {
	Message string      `json:"message"`
	Code    string      `json:"code,omitempty"`
	Status  int         `json:"status"`
	Data    interface{} `json:"data,omitempty"`
	Reason  string      `json:"reason,omitempty"`
	Cause   error       `json:"-"`
}

func FromError

func FromError(err interface{}) *Err

func (Err) Error

func (e Err) Error() string

type MirrorRepresentation

type MirrorRepresentation struct {
	Name                string         `json:"name"`
	Location            string         `json:"location"`
	Bandwidth           string         `json:"bandwidth"`
	Host                string         `json:"host"`
	URL                 string         `json:"url"`
	URLs                pq.StringArray `json:"urls" gorm:"type:text[]"`
	LastUpdated         time.Time      `json:"lastUpdated"`
	LastError           string         `json:"lastError"`
	LastRefreshDuration time.Duration  `json:"lastRefreshDuration"`
}

type MirrorResource

type MirrorResource struct {
	DB *gorm.DB
}

func (MirrorResource) Mirror

func (svc MirrorResource) Mirror(req *restful.Request, res *restful.Response)

func (MirrorResource) Mirrors

func (svc MirrorResource) Mirrors(req *restful.Request, res *restful.Response)

func (MirrorResource) RegisterTo

func (svc MirrorResource) RegisterTo(container *restful.Container)

type PackageIndexResource

type PackageIndexResource struct {
	DB *gorm.DB
}

func (PackageIndexResource) AllOrigins

func (svc PackageIndexResource) AllOrigins() ([][]string, error)

func (PackageIndexResource) GetResource

func (svc PackageIndexResource) GetResource(req *restful.Request, res *restful.Response)

func (PackageIndexResource) Names

func (svc PackageIndexResource) Names(req *restful.Request, res *restful.Response)

func (PackageIndexResource) Origins

func (svc PackageIndexResource) Origins(req *restful.Request, res *restful.Response)

func (PackageIndexResource) RegisterTo

func (svc PackageIndexResource) RegisterTo(container *restful.Container)

type PackagePageData

type PackagePageData struct {
	Name     string                  `json:"name"`
	Packages []*structs.PackageIndex `json:"packages"`
}

type PackageRepresentation

type PackageRepresentation struct {
	Branch      string         `json:"branch"`
	Repo        string         `json:"repo"`
	Arch        string         `json:"arch"`
	Name        string         `json:"name"`
	Version     string         `json:"version"`
	Size        int            `json:"size"`
	InstallSize int            `json:"installSize"`
	Description string         `json:"description"`
	URL         string         `json:"url"`
	License     string         `json:"license"`
	Origin      string         `json:"origin"`
	BuildTime   time.Time      `json:"buildTime"`
	Commit      string         `json:"commit"`
	Key         string         `json:"key"`
	Path        string         `json:"path"`
	Depends     pq.StringArray `gorm:"type:text[]" json:"depends"`
	Provides    pq.StringArray `gorm:"type:text[]" json:"provides"`
	InstallIf   pq.StringArray `gorm:"type:text[]" json:"installIf"`

	MaintainerName string `json:"maintainerName"`
}

type PageResource

type PageResource struct {
	DB *gorm.DB
}

func (PageResource) GetPackagePageData

func (svc PageResource) GetPackagePageData(req *restful.Request, res *restful.Response)

func (PageResource) RegisterTo

func (svc PageResource) RegisterTo(container *restful.Container)

Jump to

Keyboard shortcuts

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