Documentation ¶
Overview ¶
Code generated by MockGen. DO NOT EDIT. Source: rpmostreeclient.go
Generated by this command:
mockgen -source=rpmostreeclient.go -package=rpmostreeclient -destination=mock_rpmostreeclient.go
Package rpmostreeclient is a generated GoMock package.
Index ¶
- type Client
- func (c *Client) GetCurrentStaterootName() (string, error)
- func (c *Client) GetDeploymentID(stateroot string) (string, error)
- func (c *Client) GetDeploymentIndex(stateroot string) (int, error)
- func (c *Client) GetUnbootedDeploymentIndex() (int, error)
- func (c *Client) GetUnbootedStaterootName() (string, error)
- func (c *Client) IsStaterootBooted(stateroot string) (bool, error)
- func (c *Client) QueryStatus() (*Status, error)
- func (c *Client) RpmOstreeCleanup() error
- func (c *Client) RpmOstreeVersion() (*VersionData, error)
- type Deployment
- type IClient
- type MockIClient
- func (m *MockIClient) EXPECT() *MockIClientMockRecorder
- func (m *MockIClient) GetCurrentStaterootName() (string, error)
- func (m *MockIClient) GetDeploymentID(osname string) (string, error)
- func (m *MockIClient) GetDeploymentIndex(osname string) (int, error)
- func (m *MockIClient) GetUnbootedDeploymentIndex() (int, error)
- func (m *MockIClient) GetUnbootedStaterootName() (string, error)
- func (m *MockIClient) IsStaterootBooted(stateroot string) (bool, error)
- func (m *MockIClient) QueryStatus() (*Status, error)
- func (m *MockIClient) RpmOstreeCleanup() error
- func (m *MockIClient) RpmOstreeVersion() (*VersionData, error)
- type MockIClientMockRecorder
- func (mr *MockIClientMockRecorder) GetCurrentStaterootName() *gomock.Call
- func (mr *MockIClientMockRecorder) GetDeploymentID(osname any) *gomock.Call
- func (mr *MockIClientMockRecorder) GetDeploymentIndex(osname any) *gomock.Call
- func (mr *MockIClientMockRecorder) GetUnbootedDeploymentIndex() *gomock.Call
- func (mr *MockIClientMockRecorder) GetUnbootedStaterootName() *gomock.Call
- func (mr *MockIClientMockRecorder) IsStaterootBooted(stateroot any) *gomock.Call
- func (mr *MockIClientMockRecorder) QueryStatus() *gomock.Call
- func (mr *MockIClientMockRecorder) RpmOstreeCleanup() *gomock.Call
- func (mr *MockIClientMockRecorder) RpmOstreeVersion() *gomock.Call
- type Status
- type VersionData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a handle for interacting with a rpm-ostree based system.
func NewClient ¶
NewClient creates a new rpm-ostree client. The client identifier should be a short, unique and ideally machine-readable string. This could be as simple as `examplecorp-management-agent`. If you want to be more verbose, you could use a URL, e.g. `https://gitlab.com/examplecorp/management-agent`.
func (*Client) GetCurrentStaterootName ¶
GetCurrentStaterootName returns current stateroot name (a.k.a OSName)
func (*Client) GetDeploymentIndex ¶
func (*Client) GetUnbootedDeploymentIndex ¶
func (*Client) GetUnbootedStaterootName ¶
GetUnbootedStaterootName returns unbooted stateroot name (a.k.a OSName)
func (*Client) IsStaterootBooted ¶
IsStaterootBooted returns whether the specified stateroot is booted
func (*Client) QueryStatus ¶
QueryStatus loads the current system state.
func (*Client) RpmOstreeCleanup ¶
func (*Client) RpmOstreeVersion ¶
func (c *Client) RpmOstreeVersion() (*VersionData, error)
RpmOstreeVersion returns the running rpm-ostree version number
type Deployment ¶
type Deployment struct { ID string `json:"id"` OSName string `json:"osname"` Serial int32 `json:"serial"` BaseChecksum *string `json:"base-checksum"` Checksum string `json:"checksum"` Version string `json:"version"` Timestamp uint64 `json:"timestamp"` Booted bool `json:"booted"` Staged bool `json:"staged"` LiveReplaced string `json:"live-replaced,omitempty"` Origin string `json:"origin"` CustomOrigin []string `json:"custom-origin"` ContainerImageReference string `json:"container-image-reference"` RequestedPackages []string `json:"requested-packages"` RequestedBaseRemovals []string `json:"requested-base-removals"` Unlocked *string `json:"unlocked"` }
Deployment represents a bootable filesystem tree
type IClient ¶
type IClient interface { RpmOstreeVersion() (*VersionData, error) QueryStatus() (*Status, error) IsStaterootBooted(stateroot string) (bool, error) GetCurrentStaterootName() (string, error) GetUnbootedStaterootName() (string, error) GetDeploymentID(osname string) (string, error) GetDeploymentIndex(osname string) (int, error) GetUnbootedDeploymentIndex() (int, error) RpmOstreeCleanup() error // contains filtered or unexported methods }
type MockIClient ¶
type MockIClient struct {
// contains filtered or unexported fields
}
MockIClient is a mock of IClient interface.
func NewMockIClient ¶
func NewMockIClient(ctrl *gomock.Controller) *MockIClient
NewMockIClient creates a new mock instance.
func (*MockIClient) EXPECT ¶
func (m *MockIClient) EXPECT() *MockIClientMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockIClient) GetCurrentStaterootName ¶
func (m *MockIClient) GetCurrentStaterootName() (string, error)
GetCurrentStaterootName mocks base method.
func (*MockIClient) GetDeploymentID ¶
func (m *MockIClient) GetDeploymentID(osname string) (string, error)
GetDeploymentID mocks base method.
func (*MockIClient) GetDeploymentIndex ¶
func (m *MockIClient) GetDeploymentIndex(osname string) (int, error)
GetDeploymentIndex mocks base method.
func (*MockIClient) GetUnbootedDeploymentIndex ¶
func (m *MockIClient) GetUnbootedDeploymentIndex() (int, error)
GetUnbootedDeploymentIndex mocks base method.
func (*MockIClient) GetUnbootedStaterootName ¶
func (m *MockIClient) GetUnbootedStaterootName() (string, error)
GetUnbootedStaterootName mocks base method.
func (*MockIClient) IsStaterootBooted ¶
func (m *MockIClient) IsStaterootBooted(stateroot string) (bool, error)
IsStaterootBooted mocks base method.
func (*MockIClient) QueryStatus ¶
func (m *MockIClient) QueryStatus() (*Status, error)
QueryStatus mocks base method.
func (*MockIClient) RpmOstreeCleanup ¶
func (m *MockIClient) RpmOstreeCleanup() error
RpmOstreeCleanup mocks base method.
func (*MockIClient) RpmOstreeVersion ¶
func (m *MockIClient) RpmOstreeVersion() (*VersionData, error)
RpmOstreeVersion mocks base method.
type MockIClientMockRecorder ¶
type MockIClientMockRecorder struct {
// contains filtered or unexported fields
}
MockIClientMockRecorder is the mock recorder for MockIClient.
func (*MockIClientMockRecorder) GetCurrentStaterootName ¶
func (mr *MockIClientMockRecorder) GetCurrentStaterootName() *gomock.Call
GetCurrentStaterootName indicates an expected call of GetCurrentStaterootName.
func (*MockIClientMockRecorder) GetDeploymentID ¶
func (mr *MockIClientMockRecorder) GetDeploymentID(osname any) *gomock.Call
GetDeploymentID indicates an expected call of GetDeploymentID.
func (*MockIClientMockRecorder) GetDeploymentIndex ¶
func (mr *MockIClientMockRecorder) GetDeploymentIndex(osname any) *gomock.Call
GetDeploymentIndex indicates an expected call of GetDeploymentIndex.
func (*MockIClientMockRecorder) GetUnbootedDeploymentIndex ¶
func (mr *MockIClientMockRecorder) GetUnbootedDeploymentIndex() *gomock.Call
GetUnbootedDeploymentIndex indicates an expected call of GetUnbootedDeploymentIndex.
func (*MockIClientMockRecorder) GetUnbootedStaterootName ¶
func (mr *MockIClientMockRecorder) GetUnbootedStaterootName() *gomock.Call
GetUnbootedStaterootName indicates an expected call of GetUnbootedStaterootName.
func (*MockIClientMockRecorder) IsStaterootBooted ¶
func (mr *MockIClientMockRecorder) IsStaterootBooted(stateroot any) *gomock.Call
IsStaterootBooted indicates an expected call of IsStaterootBooted.
func (*MockIClientMockRecorder) QueryStatus ¶
func (mr *MockIClientMockRecorder) QueryStatus() *gomock.Call
QueryStatus indicates an expected call of QueryStatus.
func (*MockIClientMockRecorder) RpmOstreeCleanup ¶
func (mr *MockIClientMockRecorder) RpmOstreeCleanup() *gomock.Call
RpmOstreeCleanup indicates an expected call of RpmOstreeCleanup.
func (*MockIClientMockRecorder) RpmOstreeVersion ¶
func (mr *MockIClientMockRecorder) RpmOstreeVersion() *gomock.Call
RpmOstreeVersion indicates an expected call of RpmOstreeVersion.
type Status ¶
type Status struct { // Deployments is the list of bootable filesystem trees. Deployments []Deployment // Transaction is the active transaction, if any. Transaction *[]string }
Status summarizes the current worldview of the rpm-ostree daemon. The deployment list is the primary data.
type VersionData ¶
type VersionData struct { Version string `yaml:"Version"` Features []string `yaml:"Features"` Git string `yaml:"Git"` }
VersionData represents the static information about rpm-ostree.