github

package
v0.0.0-...-9530319 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

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

func NewRelease

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

Types

type Github

type Github struct {
	cloudfs.BaseFS
	// contains filtered or unexported fields
}

func (*Github) List

func (d *Github) List(ctx context.Context, path string, opts ...cloudfs.ListOption) ([]cloudfs.FileInfo, error)

func (*Github) Open

func (d *Github) Open(ctx context.Context, path string) (cloudfs.File, error)

func (*Github) Stat

func (d *Github) Stat(ctx context.Context, path string) (cloudfs.FileInfo, error)

type GithubRelease

type GithubRelease struct {
	cloudfs.BaseFS
	// contains filtered or unexported fields
}

func (*GithubRelease) List

func (d *GithubRelease) List(ctx context.Context, path string, opts ...cloudfs.ListOption) ([]cloudfs.FileInfo, error)

func (*GithubRelease) Open

func (d *GithubRelease) Open(ctx context.Context, path string) (cloudfs.File, error)

func (*GithubRelease) Stat

func (d *GithubRelease) Stat(ctx context.Context, path string) (cloudfs.FileInfo, error)

type Option

type Option struct {
	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() (cloudfs.FS, error)

type ReleaseOption

type ReleaseOption struct {
	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() (cloudfs.FS, error)

Jump to

Keyboard shortcuts

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