service

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecuteResourceCommand added in v0.2.0

func ExecuteResourceCommand(r *api.Resource, args []string) (*http.Request, string, error)

Types

type ArrayFlag

type ArrayFlag struct {
	Target   *[]interface{}
	ItemType string
}

func (*ArrayFlag) Set

func (f *ArrayFlag) Set(v string) error

func (*ArrayFlag) String

func (f *ArrayFlag) String() string

func (*ArrayFlag) Type

func (f *ArrayFlag) Type() string

type DataFlag added in v0.3.0

type DataFlag struct {
	Target *map[string]interface{}
}

DataFlag handles file references with @file syntax

func (*DataFlag) Set added in v0.3.0

func (f *DataFlag) Set(v string) error

func (*DataFlag) String added in v0.3.0

func (f *DataFlag) String() string

func (*DataFlag) Type added in v0.3.0

func (f *DataFlag) Type() string

type JSONFlag

type JSONFlag struct {
	Target interface{}
}

func (*JSONFlag) Set

func (f *JSONFlag) Set(v string) error

func (*JSONFlag) String

func (f *JSONFlag) String() string

func (*JSONFlag) Type

func (f *JSONFlag) Type() string

type Result added in v0.2.0

type Result struct {
	Output string
	// StatusCode should be 0 for undefined, or
	// the HTTP status code of the response.
	StatusCode int
}

type ServiceCommand added in v0.2.0

type ServiceCommand struct {
	API        api.API
	Headers    map[string]string
	DryRun     bool
	LogHTTP    bool
	Insecure   bool
	CACertPath string
	Client     *http.Client
}

func NewServiceCommand added in v0.2.0

func NewServiceCommand(api *api.API, headers map[string]string, dryRun bool, logHTTP bool, insecure bool, caCertPath string) (*ServiceCommand, error)

func (*ServiceCommand) Execute added in v0.2.0

func (s *ServiceCommand) Execute(args []string) (*Result, error)

func (*ServiceCommand) PrintHelp added in v0.2.0

func (s *ServiceCommand) PrintHelp() string

Jump to

Keyboard shortcuts

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