contentprovider

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const GitHubPrefix = "https://github.com/"
View Source
const LocalPathPrefix = "file://"

Variables

This section is empty.

Functions

This section is empty.

Types

type GitHub

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

func NewGitHub

func NewGitHub(remoteURI string) (*GitHub, error)

func (*GitHub) Cleanup

func (cp *GitHub) Cleanup() error

func (*GitHub) DownloadContent

func (cp *GitHub) DownloadContent() error

func (*GitHub) RemoteURI

func (cp *GitHub) RemoteURI() string

func (*GitHub) WorkingDir

func (cp *GitHub) WorkingDir() string

type LocalPath

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

func NewLocalPath

func NewLocalPath(path string) (*LocalPath, error)

func (*LocalPath) Cleanup

func (cp *LocalPath) Cleanup() error

func (*LocalPath) DownloadContent

func (cp *LocalPath) DownloadContent() error

func (*LocalPath) RemoteURI

func (cp *LocalPath) RemoteURI() string

func (*LocalPath) WorkingDir

func (cp *LocalPath) WorkingDir() string

type RemoteContentProvider

type RemoteContentProvider interface {
	// DownloadContent Download the remote content to a local working directory
	DownloadContent() error
	// Cleanup Perform the cleanup task for the provider
	Cleanup() error
	// WorkingDir Get the local working directory
	WorkingDir() string
	// RemoteURI Get the remote URI
	RemoteURI() string
}

func ByURI

func ByURI(uri string) (RemoteContentProvider, error)

Jump to

Keyboard shortcuts

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