storer

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AvailableStorer = map[string]Storer{
	"github": &GithubStorer{},
}

Functions

func IsValidWannabeID

func IsValidWannabeID(id string) bool

func UpdateIssues

func UpdateIssues(ctx context.Context, s Storer, currentIssues map[string]Issue, comments []parser.Comment) error

Types

type ContextKey

type ContextKey string
const DryRunKey ContextKey = "dry-run"

type GithubStorer

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

func (GithubStorer) CloseIssue

func (s GithubStorer) CloseIssue(ctx context.Context, id string) error

func (GithubStorer) CreateIssue

func (s GithubStorer) CreateIssue(ctx context.Context, issue Issue) error

func (GithubStorer) FetchCurrentOpenIssues

func (s GithubStorer) FetchCurrentOpenIssues(ctx context.Context) (map[string]Issue, error)

func (*GithubStorer) Init

func (s *GithubStorer) Init(ctx context.Context) error

func (GithubStorer) UpdateIssue

func (s GithubStorer) UpdateIssue(ctx context.Context, id string, issue Issue) error

type Issue

type Issue struct {
	Title     string
	Body      string
	ID        string
	WannaBeID string
}

type Storer

type Storer interface {
	FetchCurrentOpenIssues(ctx context.Context) (map[string]Issue, error)
	UpdateIssue(ctx context.Context, id string, issue Issue) error
	CreateIssue(ctx context.Context, issue Issue) error
	CloseIssue(ctx context.Context, id string) error
	Init(ctx context.Context) error
}

Jump to

Keyboard shortcuts

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