internal

package
v0.0.18 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultClient

func DefaultClient() *github.Client

func InvalidPath added in v0.0.18

func InvalidPath(path Path, err error) error

func Open added in v0.0.18

func Open(ctx context.Context, gh *github.Client, path Path) (afero.File, error)

func TryGetId added in v0.0.18

func TryGetId[T NameOrId](x T) (int64, bool)

Types

type AssetPath added in v0.0.18

type AssetPath struct {
	ReleasePath
	Asset string
}

func NewAssetPath added in v0.0.18

func NewAssetPath(owner, repo, release, asset string) AssetPath

func ParseAsset added in v0.0.18

func ParseAsset(path Path) (asset AssetPath, err error)

func (AssetPath) Parse added in v0.0.18

func (p AssetPath) Parse(path string) (Path, error)

func (AssetPath) String added in v0.0.18

func (p AssetPath) String() string

type ContextAccessor

type ContextAccessor func() context.Context

func BackgroundContext

func BackgroundContext() ContextAccessor

func TodoContext

func TodoContext() ContextAccessor

func (ContextAccessor) Context

func (c ContextAccessor) Context() context.Context

type NameOrId added in v0.0.18

type NameOrId interface {
	~string | ~int64
}

type OwnerPath added in v0.0.18

type OwnerPath struct {
	Owner string
}

func NewOwnerPath added in v0.0.18

func NewOwnerPath(owner string) OwnerPath

func ParseOwner added in v0.0.18

func ParseOwner(path Path) (owner OwnerPath, err error)

func (OwnerPath) Parse added in v0.0.18

func (p OwnerPath) Parse(path string) (Path, error)

func (OwnerPath) String added in v0.0.18

func (p OwnerPath) String() string

type Parser added in v0.0.18

type Parser interface {
	Parse(string) (Path, error)
}

type Path added in v0.0.18

type Path interface {
	fmt.Stringer
	Asset() (string, error)
	Branch() (string, error)
	Content() []string
	Owner() (string, error)
	Repository() (string, error)
	Release() (string, error)
}

func Parse added in v0.0.18

func Parse(parts ...string) (Path, error)

func ParseUrl added in v0.0.18

func ParseUrl(rawURL string) (Path, error)

type ReadOnlyFile

type ReadOnlyFile struct{}

func (ReadOnlyFile) Sync

func (ReadOnlyFile) Sync() error

Sync implements afero.File.

func (ReadOnlyFile) Truncate

func (ReadOnlyFile) Truncate(int64) error

Truncate implements afero.File.

func (ReadOnlyFile) Write

func (ReadOnlyFile) Write([]byte) (n int, err error)

Write implements afero.File.

func (ReadOnlyFile) WriteAt

func (ReadOnlyFile) WriteAt([]byte, int64) (n int, err error)

WriteAt implements afero.File.

func (ReadOnlyFile) WriteString

func (ReadOnlyFile) WriteString(string) (ret int, err error)

WriteString implements afero.File.

type ReleasePath added in v0.0.18

type ReleasePath struct {
	RepositoryPath
	Release string
}

func NewReleasePath added in v0.0.18

func NewReleasePath(owner, repo, release string) ReleasePath

func ParseRelease added in v0.0.18

func ParseRelease(path Path) (release ReleasePath, err error)

func (ReleasePath) Parse added in v0.0.18

func (p ReleasePath) Parse(path string) (Path, error)

func (ReleasePath) String added in v0.0.18

func (p ReleasePath) String() string

type RepositoryPath added in v0.0.18

type RepositoryPath struct {
	OwnerPath
	Repository string
}

func NewRepositoryPath added in v0.0.18

func NewRepositoryPath(owner, repo string) RepositoryPath

func ParseRepository added in v0.0.18

func ParseRepository(path Path) (repo RepositoryPath, err error)

func (RepositoryPath) Parse added in v0.0.18

func (p RepositoryPath) Parse(path string) (Path, error)

func (RepositoryPath) String added in v0.0.18

func (p RepositoryPath) String() string

Jump to

Keyboard shortcuts

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