service

package
v6.2.2 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package service implements the `service` commands.

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("not found")

Functions

func Apply

func Apply(ctx context.Context, c *platform.Client, o ApplyOptions) error

func Delete

func Delete(ctx context.Context, c *platform.Client, idText string) error

func Get

func GetVariables

func GetVariables(ctx context.Context, c *platform.Client, o VariableGetOptions) error
func Link(ctx context.Context, c *platform.Client, idText, experimentKey, category string) error

func List

func Provide

func Provide(ctx context.Context, c *platform.Client, o ProvideOptions) error

func RefusedForProvidedExperiments

func RefusedForProvidedExperiments(err error) bool

RefusedForProvidedExperiments recognises the platform refusing a change that would orphan provided experiments. It names its query parameter, so the user is pointed at the CLI flag instead.

func Risk

func SetVariables

func SetVariables(ctx context.Context, c *platform.Client, pairs []string, o VariableSetOptions) error

SetVariables merges KEY=VALUE arguments over a file's variables. With --replace, the result is all there is.

func Unlink(ctx context.Context, c *platform.Client, idText, experimentKey string) error

Types

type ApplyOptions

type ApplyOptions struct {
	Files             []string
	Recursive         bool
	DeleteExperiments bool
}

type ExperimentListOptions

type ExperimentListOptions struct {
	ID                string
	Categories, Types []string
	Type              string
}

type GetOptions

type GetOptions struct {
	ID, File, Type string
}

type ListOptions

type ListOptions struct {
	Teams, Environments, Experiments []string
	Type                             string
}

type ProvideOptions

type ProvideOptions struct {
	ID         string
	Experiment string
	experiment.TemplateOptions
}

type RiskOptions

type RiskOptions struct {
	ID        string
	Type      string
	FailAbove *int
}

type VariableGetOptions

type VariableGetOptions struct {
	ID, Type string
}

type VariableSetOptions

type VariableSetOptions struct {
	ID      string
	File    string
	Replace bool
}

Jump to

Keyboard shortcuts

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