servicekeys

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2026 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddCommandsTo

func AddCommandsTo(rootCmd *cobra.Command)

func CreateServiceKey

func CreateServiceKey(cmd *cobra.Command, args []string, noColor bool) error

func GetServiceKey

func GetServiceKey(cmd *cobra.Command, args []string, noColor bool, outputFormat string) error

func ListServiceKeys

func ListServiceKeys(cmd *cobra.Command, args []string, noColor bool, outputFormat string) error

func UpdateServiceKey

func UpdateServiceKey(cmd *cobra.Command, args []string, noColor bool) error

Types

type MockServiceKeyService

type MockServiceKeyService struct {
	CreateServiceKeyError           error
	CreateServiceKeyResult          *megaport.CreateServiceKeyResponse
	CapturedCreateServiceKeyRequest *megaport.CreateServiceKeyRequest

	ListServiceKeysError           error
	ListServiceKeysResult          *megaport.ListServiceKeysResponse
	CapturedListServiceKeysRequest *megaport.ListServiceKeysRequest

	UpdateServiceKeyError           error
	UpdateServiceKeyResult          *megaport.UpdateServiceKeyResponse
	CapturedUpdateServiceKeyRequest *megaport.UpdateServiceKeyRequest

	GetServiceKeyError         error
	GetServiceKeyResult        *megaport.ServiceKey
	CapturedGetServiceKeyKeyID string
}

func (*MockServiceKeyService) CreateServiceKey

func (*MockServiceKeyService) GetServiceKey

func (m *MockServiceKeyService) GetServiceKey(ctx context.Context, keyId string) (*megaport.ServiceKey, error)

func (*MockServiceKeyService) ListServiceKeys

func (*MockServiceKeyService) UpdateServiceKey

type Module added in v0.3.4

type Module struct{}

Module implements the cmdbuilder.Module interface for servicekeys

func NewModule added in v0.3.4

func NewModule() *Module

NewModule creates a new servicekeys module

func (*Module) Name added in v0.3.4

func (m *Module) Name() string

Name returns the module name

func (*Module) RegisterCommands added in v0.3.4

func (m *Module) RegisterCommands(rootCmd *cobra.Command)

RegisterCommands adds the servicekeys command to the root command

type ServiceKeyOutput

type ServiceKeyOutput struct {
	output.Output `json:"-" header:"-"`
	KeyUID        string `json:"key_uid" header:"Key UID"`
	ProductName   string `json:"product_name" header:"Product Name"`
	ProductUID    string `json:"product_uid" header:"Product UID"`
	Description   string `json:"description" header:"Description"`
	CreateDate    string `json:"create_date" header:"Create Date"`
}

func ToServiceKeyOutput

func ToServiceKeyOutput(sk *megaport.ServiceKey) (ServiceKeyOutput, error)

Jump to

Keyboard shortcuts

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