server

package
v0.0.0-...-8822322 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package server provides all types, validator, helpers methods to create Runtime Server API commands

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteServerCommand

func DeleteServerCommand(opts ...CfgServerArgsOption) *core.Command

func GetCurrentServerCommand

func GetCurrentServerCommand(opts ...CfgServerArgsOption) *core.Command

func GetServerCommand

func GetServerCommand(opts ...CfgServerArgsOption) *core.Command

func NewDeleteServerCommand

func NewDeleteServerCommand(inputOpts *DeleteServerInputOptions, outputOpts *DeleteServerOutputOptions) (*core.Command, error)

NewDeleteServerCommand constructs a command to make a call to specific runtime version DeleteServer API Input Parameter inputOpts has all input parameters which are required for Runtime DeleteServer API Input Parameter: outputOpts has details about expected output from Runtime DeleteServer API call Return: command to execute or error if any validations fails for DeleteServerInputOptions or DeleteServerOutputOptions This method does validate the input parameters DeleteServerInputOptions or DeleteServerOutputOptions based on Runtime API Version For more details about supported parameters refer to DeleteServerInputOptions or DeleteServerOutputOptions definition(and ServerOpts struct, which is embedded)

func NewGetCurrentServerCommand

func NewGetCurrentServerCommand(inputOpts *GetCurrentServerInputOptions, outputOpts *GetCurrentServerOutputOptions) (*core.Command, error)

NewGetCurrentServerCommand constructs a command to make a call to specific runtime version GetCurrentServer API Input Parameter inputOpts has all input parameters which are required for Runtime GetCurrentServer API Input Parameter: outputOpts has details about expected output from Runtime GetCurrentServer API call Return: command to execute or error if any validations fails for GetCurrentServerInputOptions or GetCurrentServerOutputOptions This method does validate the input parameters GetCurrentServerInputOptions or GetCurrentServerOutputOptions based on Runtime API Version For more details about supported parameters refer to GetCurrentServerInputOptions or GetCurrentServerOutputOptions definition(and ServerOpts struct, which is embedded)

func NewGetServerCommand

func NewGetServerCommand(inputOpts *GetServerInputOptions, outputOpts *GetServerOutputOptions) (*core.Command, error)

NewGetServerCommand constructs a command to make a call to specific runtime version GetServer API Input Parameter inputOpts has all input parameters which are required for Runtime GetServer API Input Parameter: outputOpts has details about expected output from Runtime GetServer API call Return: command to execute or error if any validations fails for GetServerInputOptions or GetServerOutputOptions This method does validate the input parameters GetServerInputOptions or GetServerOutputOptions based on Runtime API Version For more details about supported parameters refer to GetServerInputOptions or GetServerOutputOptions definition(and ServerOpts struct, which is embedded)

func NewRemoveCurrentServerCommand

func NewRemoveCurrentServerCommand(inputOpts *RemoveCurrentServerInputOptions, outputOpts *RemoveCurrentServerOutputOptions) (*core.Command, error)

NewRemoveCurrentServerCommand constructs a command to make a call to specific runtime version RemoveCurrentServer API Input Parameter inputOpts has all input parameters which are required for Runtime RemoveCurrentServer API Input Parameter: outputOpts has details about expected output from Runtime RemoveCurrentServer API call Return: command to execute or error if any validations fails for RemoveCurrentServerInputOptions or RemoveCurrentServerOutputOptions This method does validate the input parameters RemoveCurrentServerInputOptions/ RemoveCurrentServerOutputOptions based on Runtime API Version For more details about supported parameters refer to RemoveCurrentServerInputOptions/ RemoveCurrentServerOutputOptions definition(and ServerOpts struct, which is embedded)

func NewSetCurrentServerCommand

func NewSetCurrentServerCommand(inputOpts *SetCurrentServerInputOptions, outputOpts *SetCurrentServerOutputOptions) (*core.Command, error)

NewSetCurrentServerCommand constructs a command to make a call to specific runtime version SetCurrentServer API Input Parameter inputOpts has all input parameters which are required for Runtime SetCurrentServer API Input Parameter: outputOpts has details about expected output from Runtime SetCurrentServer API call Return: command to execute or error if any validations fails for SetCurrentServerInputOptions or SetCurrentServerOutputOptions This method does validate the input parameters SetCurrentServerInputOptions or SetCurrentServerOutputOptions based on Runtime API Version For more details about supported parameters refer to SetCurrentServerInputOptions or SetCurrentServerOutputOptions definition(and ServerOpts struct, which is embedded)

func NewSetServerCommand

func NewSetServerCommand(inputOpts *SetServerInputOptions, outputOpts *SetServerOutputOptions) (*core.Command, error)

NewSetServerCommand constructs a command to make a call to specific runtime version SetServer API Input Parameter inputOpts has all input parameters which are required for Runtime SetServer API Input Parameter: outputOpts has details about expected output from Runtime SetServer API call Return: command to execute or error if any validations fails for SetServerInputOptions or SetServerOutputOptions This method does validate the input parameters SetServerInputOptions or SetServerOutputOptions based on Runtime API Version For more details about supported parameters refer to SetServerInputOptions or SetServerOutputOptions definition(and ServerOpts struct, which is embedded)

func RemoveCurrentServerCommand

func RemoveCurrentServerCommand(opts ...CfgServerArgsOption) *core.Command

func SetCurrentServerCommand

func SetCurrentServerCommand(opts ...CfgServerArgsOption) *core.Command

func SetServerCommand

func SetServerCommand(opts ...CfgServerArgsOption) *core.Command

Types

type CfgServerArgs

type CfgServerArgs struct {
	RuntimeAPIVersion     *core.RuntimeAPIVersion
	ServerName            string // required
	Type                  types.ServerType
	SetCurrentServer      bool // required
	GlobalOpts            *types.GlobalServerOpts
	ManagementClusterOpts *types.ManagementClusterServerOpts
	DiscoverySources      []types.PluginDiscoveryOpts
	ValidationStrategy    core.ValidationStrategy
	Error                 bool
}

type CfgServerArgsOption

type CfgServerArgsOption func(args *CfgServerArgs)

func WithError

func WithError() CfgServerArgsOption

func WithRuntimeVersion

func WithRuntimeVersion(version core.RuntimeVersion) CfgServerArgsOption

func WithServerName

func WithServerName(name string) CfgServerArgsOption

type DeleteServerInputOptions

type DeleteServerInputOptions struct {
	*core.RuntimeAPIVersion        // required
	ServerName              string // required
}

DeleteServerInputOptions used to generate DeleteServer command

func (*DeleteServerInputOptions) Validate

func (opts *DeleteServerInputOptions) Validate() (bool, error)

Validate the opts as per runtime version i.e. check whether the expected fields are supported for the runtime version specified

type DeleteServerOutputOptions

type DeleteServerOutputOptions struct {
	*core.RuntimeAPIVersion                         // required
	ValidationStrategy      core.ValidationStrategy // Type of validation to be performed i.e. exact or partial. default is partial
	Error                   string                  // expected error message could be the sub string of actual error message
}

DeleteServerOutputOptions used to generate DeleteServer command

type GetCurrentServerInputOptions

type GetCurrentServerInputOptions struct {
	*core.RuntimeAPIVersion // required
}

GetCurrentServerInputOptions used to generate GetCurrentServer command

func (*GetCurrentServerInputOptions) Validate

func (opts *GetCurrentServerInputOptions) Validate() (bool, error)

Validate the opts as per runtime version i.e. check whether the expected fields are supported for the runtime version specified

type GetCurrentServerOutputOptions

type GetCurrentServerOutputOptions struct {
	*core.RuntimeAPIVersion                         // required
	*types.ServerOpts                               // For specific version options look into ServerOpts definition
	ValidationStrategy      core.ValidationStrategy // Type of validation to be performed i.e. exact or partial. default is partial
	Error                   string                  // expected error message could be the sub string of actual error message
}

GetCurrentServerOutputOptions used to generate GetCurrentServer command

func (*GetCurrentServerOutputOptions) Validate

func (opts *GetCurrentServerOutputOptions) Validate() (bool, error)

Validate the getServerOutputOptions as per runtime version i.e. check whether the expected fields are supported for the runtime version specified

type GetServerInputOptions

type GetServerInputOptions struct {
	*core.RuntimeAPIVersion        // required
	ServerName              string // required
}

GetServerInputOptions used to generate GetServer command

func (*GetServerInputOptions) Validate

func (opts *GetServerInputOptions) Validate() (bool, error)

Validate the opts as per runtime version i.e. check whether the expected fields are supported for the runtime version specified

type GetServerOutputOptions

type GetServerOutputOptions struct {
	*core.RuntimeAPIVersion                         // required
	*types.ServerOpts                               // For specific version options look into ServerOpts definition
	ValidationStrategy      core.ValidationStrategy // Type of validation to be performed i.e. exact or partial. default is partial
	Error                   string                  // expected error message could be the sub string of actual error message
}

GetServerOutputOptions used to generate GetServer command

func (*GetServerOutputOptions) Validate

func (opts *GetServerOutputOptions) Validate() (bool, error)

Validate the opts as per runtime version i.e. check whether the expected fields are supported for the runtime version specified

type RemoveCurrentServerInputOptions

type RemoveCurrentServerInputOptions struct {
	*core.RuntimeAPIVersion        // required
	ServerName              string // required for v1.0.0 - v0.28.0
}

RemoveCurrentServerInputOptions used to generate RemoveCurrentServer command

type RemoveCurrentServerOutputOptions

type RemoveCurrentServerOutputOptions struct {
	*core.RuntimeAPIVersion                         // required
	ValidationStrategy      core.ValidationStrategy // Type of validation to be performed i.e. exact or partial. default is partial
	Error                   string                  // expected error message could be the sub string of actual error message
}

RemoveCurrentServerOutputOptions used to generate RemoveCurrentServer command

type SetCurrentServerInputOptions

type SetCurrentServerInputOptions struct {
	*core.RuntimeAPIVersion        // required
	ServerName              string // required
}

SetCurrentServerInputOptions used to generate SetCurrentServer command

func (*SetCurrentServerInputOptions) Validate

func (opts *SetCurrentServerInputOptions) Validate() (bool, error)

Validate the opts as per runtime version i.e. check whether the expected fields are supported for the runtime version specified

type SetCurrentServerOutputOptions

type SetCurrentServerOutputOptions struct {
	*core.RuntimeAPIVersion        // required
	Error                   string // expected error message could be the sub string of actual error message
}

SetCurrentServerOutputOptions used to generate SetCurrentServer command

type SetServerInputOptions

type SetServerInputOptions struct {
	*core.RuntimeAPIVersion      // required
	*types.ServerOpts            // required
	SetCurrentServer        bool // required
}

SetServerInputOptions used to generate SetServer command

func (*SetServerInputOptions) Validate

func (opts *SetServerInputOptions) Validate() (bool, error)

Validate the setServerInputOptions as per runtime version i.e. check whether mandatory fields are set and throw error if missing

type SetServerOutputOptions

type SetServerOutputOptions struct {
	ValidationStrategy core.ValidationStrategy // Type of validation to be performed i.e. exact or partial. default is partial
	Error              string                  // expected error message could be the sub string of actual error message
}

SetServerOutputOptions used to generate SetServer command

Jump to

Keyboard shortcuts

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