api

package
v0.0.0-...-d3309c3 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	// contains filtered or unexported fields
}

func NewAPI

func NewAPI(panelVersion string, url ...string) *API

func (*API) AppBySlug

func (r *API) AppBySlug(slug string) (*App, error)

AppBySlug 根据slug返回应用

func (*API) Apps

func (r *API) Apps() (*Apps, error)

Apps 返回所有应用

func (*API) GoogleEAB

func (r *API) GoogleEAB() (*EAB, error)

func (*API) IntermediateVersions

func (r *API) IntermediateVersions() (*Versions, error)

IntermediateVersions 返回当前版本之后的所有版本

func (*API) LatestVersion

func (r *API) LatestVersion() (*Version, error)

LatestVersion 返回最新版本

func (*API) RewritesByType

func (r *API) RewritesByType(typ string) (*Rewrites, error)

type App

type App struct {
	CreatedAt   time.Time `json:"created_at"`
	UpdatedAt   time.Time `json:"updated_at"`
	Slug        string    `json:"slug"`
	Icon        string    `json:"icon"`
	Name        string    `json:"name"`
	Description string    `json:"description"`
	Categories  []string  `json:"categories"`
	Depends     string    `json:"depends"`
	Channels    []struct {
		Slug      string `json:"slug"`
		Name      string `json:"name"`
		Panel     string `json:"panel"`
		Install   string `json:"install"`
		Uninstall string `json:"uninstall"`
		Update    string `json:"update"`
		Subs      []struct {
			Log     string `json:"log"`
			Version string `json:"version"`
		} `json:"subs"`
	} `json:"channels"`
	Order int `json:"order"`
}

type Apps

type Apps []*App

type EAB

type EAB struct {
	KeyID  string `json:"key_id"`
	MacKey string `json:"mac_key"`
}

type Response

type Response struct {
	Message string `json:"message"`
	Data    any    `json:"data"`
}

type Rewrite

type Rewrite struct {
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
	Name      string    `json:"name"`
	Type      string    `json:"type"`
	Content   string    `json:"content"`
}

type Rewrites

type Rewrites []Rewrite

type Version

type Version struct {
	CreatedAt   time.Time         `json:"created_at"`
	UpdatedAt   time.Time         `json:"updated_at"`
	Type        string            `json:"type"`
	Version     string            `json:"version"`
	Description string            `json:"description"`
	Downloads   []VersionDownload `json:"downloads"`
}

type VersionDownload

type VersionDownload struct {
	URL      string `json:"url"`
	Arch     string `json:"arch"`
	Checksum string `json:"checksum"`
}

type Versions

type Versions []Version

Jump to

Keyboard shortcuts

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