Documentation ¶
Index ¶
- func NewClient(ctx context.Context, c *cli.Command) (woodpecker.Client, error)
- func ParseKeyPair(p []string) map[string]string
- func ParseRepo(client woodpecker.Client, str string) (repoID int64, err error)
- func ParseStep(client woodpecker.Client, repoID, number int64, stepArg string) (stepID int64, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewClient ¶
func NewClient(ctx context.Context, c *cli.Command) (woodpecker.Client, error)
NewClient returns a new client from the CLI context.
func ParseKeyPair ¶
ParseKeyPair parses a key=value pair.
func ParseRepo ¶
func ParseRepo(client woodpecker.Client, str string) (repoID int64, err error)
ParseRepo parses the repository owner and name from a string.
func ParseStep ¶ added in v2.7.0
func ParseStep(client woodpecker.Client, repoID, number int64, stepArg string) (stepID int64, err error)
ParseStep parses the step id form a string which may either be the step PID (step number) or a step name. These rules apply:
- Step PID take precedence over step name when searching for a match. - First match is used, when there are multiple steps with the same name.
Strictly speaking, this is not parsing, but a lookup.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.