client

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package client is a generated GoMock package.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEmptyResponse = errors.New("empty response")
)

Functions

func NewFromConfig

func NewFromConfig(config *baseclient.Config) (*client.ClientWithResponses, error)

NewFromConfig returns a new FlightCtl API client from the given config.

func NewGRPCClientFromConfig

func NewGRPCClientFromConfig(config *baseclient.Config, endpoint string) (grpc_v1.RouterServiceClient, error)

Types

type AuthInfo

type AuthInfo = baseclient.AuthInfo

type Config

type Config = baseclient.Config

func NewDefault

func NewDefault() *Config

type Enrollment

type Enrollment interface {
	SetRPCMetricsCallback(cb func(operation string, durationSeconds float64, err error))
	CreateEnrollmentRequest(ctx context.Context, req v1alpha1.EnrollmentRequest, cb ...client.RequestEditorFn) (*v1alpha1.EnrollmentRequest, error)
	GetEnrollmentRequest(ctx context.Context, id string, cb ...client.RequestEditorFn) (*v1alpha1.EnrollmentRequest, error)
}

Enrollment is client the interface for managing device enrollment.

func NewEnrollment

func NewEnrollment(
	client *client.ClientWithResponses,
) Enrollment

type Management

type Management interface {
	UpdateDeviceStatus(ctx context.Context, name string, device v1alpha1.Device, rcb ...client.RequestEditorFn) error
	GetRenderedDeviceSpec(ctx context.Context, name string, params *v1alpha1.GetRenderedDeviceSpecParams, rcb ...client.RequestEditorFn) (*v1alpha1.RenderedDeviceSpec, int, error)
}

Management is the client interface for managing devices.

func NewManagement

func NewManagement(
	client *client.ClientWithResponses,
) Management

type MockEnrollment

type MockEnrollment struct {
	// contains filtered or unexported fields
}

MockEnrollment is a mock of Enrollment interface.

func NewMockEnrollment

func NewMockEnrollment(ctrl *gomock.Controller) *MockEnrollment

NewMockEnrollment creates a new mock instance.

func (*MockEnrollment) CreateEnrollmentRequest

CreateEnrollmentRequest mocks base method.

func (*MockEnrollment) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockEnrollment) GetEnrollmentRequest

func (m *MockEnrollment) GetEnrollmentRequest(ctx context.Context, id string, cb ...client.RequestEditorFn) (*v1alpha1.EnrollmentRequest, error)

GetEnrollmentRequest mocks base method.

func (*MockEnrollment) SetRPCMetricsCallback

func (m *MockEnrollment) SetRPCMetricsCallback(cb func(string, float64, error))

SetRPCMetricsCallback mocks base method.

type MockEnrollmentMockRecorder

type MockEnrollmentMockRecorder struct {
	// contains filtered or unexported fields
}

MockEnrollmentMockRecorder is the mock recorder for MockEnrollment.

func (*MockEnrollmentMockRecorder) CreateEnrollmentRequest

func (mr *MockEnrollmentMockRecorder) CreateEnrollmentRequest(ctx, req any, cb ...any) *gomock.Call

CreateEnrollmentRequest indicates an expected call of CreateEnrollmentRequest.

func (*MockEnrollmentMockRecorder) GetEnrollmentRequest

func (mr *MockEnrollmentMockRecorder) GetEnrollmentRequest(ctx, id any, cb ...any) *gomock.Call

GetEnrollmentRequest indicates an expected call of GetEnrollmentRequest.

func (*MockEnrollmentMockRecorder) SetRPCMetricsCallback

func (mr *MockEnrollmentMockRecorder) SetRPCMetricsCallback(cb any) *gomock.Call

SetRPCMetricsCallback indicates an expected call of SetRPCMetricsCallback.

type MockManagement

type MockManagement struct {
	// contains filtered or unexported fields
}

MockManagement is a mock of Management interface.

func NewMockManagement

func NewMockManagement(ctrl *gomock.Controller) *MockManagement

NewMockManagement creates a new mock instance.

func (*MockManagement) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockManagement) GetRenderedDeviceSpec

GetRenderedDeviceSpec mocks base method.

func (*MockManagement) UpdateDeviceStatus

func (m *MockManagement) UpdateDeviceStatus(ctx context.Context, name string, device v1alpha1.Device, rcb ...client.RequestEditorFn) error

UpdateDeviceStatus mocks base method.

type MockManagementMockRecorder

type MockManagementMockRecorder struct {
	// contains filtered or unexported fields
}

MockManagementMockRecorder is the mock recorder for MockManagement.

func (*MockManagementMockRecorder) GetRenderedDeviceSpec

func (mr *MockManagementMockRecorder) GetRenderedDeviceSpec(ctx, name, params any, rcb ...any) *gomock.Call

GetRenderedDeviceSpec indicates an expected call of GetRenderedDeviceSpec.

func (*MockManagementMockRecorder) UpdateDeviceStatus

func (mr *MockManagementMockRecorder) UpdateDeviceStatus(ctx, name, device any, rcb ...any) *gomock.Call

UpdateDeviceStatus indicates an expected call of UpdateDeviceStatus.

type Service

type Service = baseclient.Service

type Systemd

type Systemd struct {
	// contains filtered or unexported fields
}

func NewSystemd

func NewSystemd(exec executer.Executer) *Systemd

func (*Systemd) DaemonReload

func (s *Systemd) DaemonReload(ctx context.Context) error

func (*Systemd) Disable

func (s *Systemd) Disable(ctx context.Context, name string) error

func (*Systemd) Enable

func (s *Systemd) Enable(ctx context.Context, name string) error

func (*Systemd) Reload

func (s *Systemd) Reload(ctx context.Context, name string) error

func (*Systemd) Restart

func (s *Systemd) Restart(ctx context.Context, name string) error

func (*Systemd) Start

func (s *Systemd) Start(ctx context.Context, name string) error

func (*Systemd) Stop

func (s *Systemd) Stop(ctx context.Context, name string) error

Jump to

Keyboard shortcuts

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