tf

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewResourcePlugin

func NewResourcePlugin(config string) (apiv1.ResourcePlugin, error)

Types

type Attributes added in v0.3.0

type Attributes struct {
	Description string            `json:"description"`
	Public      bool              `json:"public"`
	Files       map[string]string `json:"files"`
}

type Configuration

type Configuration struct {
	GithubToken string `json:"github_token"`
	APIURL      string `json:"api_url"`
}

type Gist

type Gist struct {
	ID string
	Attributes
}

type GistManager

type GistManager interface {
	CreateGist(ctx context.Context, gist Gist) (*Gist, error)
	GetGist(ctx context.Context, id string) (*Gist, error)
	DeleteGist(ctx context.Context, id string) error
	UpdateGist(ctx context.Context, gist Gist) error
}

GistManager knows how to manage Gists with external storage.

func NewAPIGistManager

func NewAPIGistManager(ghToken string, apiURL string) GistManager

NewAPIGistManager returns a Gist manager implementation using Github's HTTP rest API. More info here: https://docs.github.com/en/rest/gists/gists.

Jump to

Keyboard shortcuts

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