resource

package
v0.0.0-...-afad4ed Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Fuse = Mode{"fuse"}
	Gate = Mode{"gate"}
	Modi = enum.New(Fuse, Gate)
)

Functions

This section is empty.

Types

type Duration

type Duration struct {
	time.Duration
}

func (Duration) MarshalJSON

func (d Duration) MarshalJSON() ([]byte, error)

func (*Duration) UnmarshalJSON

func (d *Duration) UnmarshalJSON(b []byte) error

type Mode

type Mode enum.Member[string]

func (*Mode) UnmarshalJSON

func (m *Mode) UnmarshalJSON(b []byte) error

type NameValuePair

type NameValuePair struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

type Params

type Params struct {
	Mode          Mode     `json:"mode" validate:"required"`
	Scope         []string `json:"scope"`
	Runway        Duration `json:"runway"`
	RetryInterval Duration `json:"retry_interval"`
	Verbose       bool     `json:"verbose"`
}

type Request

type Request struct {
	Source Source `json:"source" validate:"required"`
}

type Source

type Source struct {
	URI        string `json:"uri" validate:"required"` // the git resource calls it uri, so we do it, too
	PrivateKey string `json:"private_key"`
	KnownHosts string `json:"known_hosts"`
	Username   string `json:"username"`
	Password   string `json:"password"`
	Branch     string `json:"branch"`
	Path       string `json:"path" validate:"required,filepath"`
}

func (Source) Auth

func (source Source) Auth() (auth transport.AuthMethod, err error)

type Version

type Version struct {
	SHA string `json:"sha"`
}

Jump to

Keyboard shortcuts

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