recdn

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Cache  cache.CacheDriver
	Config *AppConfig
}

func New

func New(config *AppConfig) (*App, error)

func (*App) GitHub

func (a *App) GitHub(repo string, branch string, file string) (*File, error)

func (*App) Npm

func (a *App) Npm(pack string, version string, file string) (*File, error)

type AppConfig

type AppConfig struct {
	Cache  cache.CacheConfig
	GitHub GitHubConfig
}

type File

type File struct {
	// 文件类型
	Type string

	// 文件内容
	Content interface{}
}

func Fetch

func Fetch(path string) (*File, error)

func (*File) FromString

func (f *File) FromString(data string) error

func (*File) String

func (f *File) String() (string, error)

type GitHubConfig

type GitHubConfig struct {
	Raw string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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