github

package
v0.0.0-...-f856fe1 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2025 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(opt *Option) (driver.FS, error)

func NewRelease

func NewRelease(opt *ReleaseOption) (driver.FS, error)

Types

type Github

type Github struct {
	driver.Base
	// contains filtered or unexported fields
}

func (*Github) Get

func (d *Github) Get(ctx context.Context, path string) (driver.File, error)

func (*Github) List

func (d *Github) List(ctx context.Context, path string, metas ...driver.Meta) ([]driver.File, error)

func (*Github) Open

func (d *Github) Open(path string) (driver.FileReader, error)

type GithubRelease

type GithubRelease struct {
	driver.Base
	// contains filtered or unexported fields
}

func (*GithubRelease) Get

func (d *GithubRelease) Get(ctx context.Context, path string) (driver.File, error)

func (*GithubRelease) List

func (d *GithubRelease) List(ctx context.Context, path string, metas ...driver.Meta) ([]driver.File, error)

func (*GithubRelease) Open

func (d *GithubRelease) Open(path string) (driver.FileReader, error)

type Option

type Option struct {
	base.Option
	Ref        string `json:"ref"`
	Repo       string `json:"repo"`
	Owner      string `json:"owner"  validate:"required"`
	Token      string `json:"token"`
	ShowTag    bool   `json:"show_tag"`
	ShowBranch bool   `json:"show_branch"`
}

func (*Option) NewFS

func (opt *Option) NewFS() (driver.FS, error)

type ReleaseOption

type ReleaseOption struct {
	base.Option
	Repo    string `json:"repo"`
	Owner   string `json:"owner"  validate:"required"`
	Release string `json:"release"`
	Token   string `json:"token"`
}

func (*ReleaseOption) NewFS

func (opt *ReleaseOption) NewFS() (driver.FS, error)

Jump to

Keyboard shortcuts

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