Documentation
¶
Index ¶
- func NewCreateCmd() *cobra.Command
- func NewDeleteCmd() *cobra.Command
- func NewGetCmd() *cobra.Command
- func NewListCmd() *cobra.Command
- func NewUpdateCmd() *cobra.Command
- func RegisterContentFlags(cmd *cobra.Command)
- func ResolveContent(cmd *cobra.Command) (string, bool)
- type CreateUserDataOperation
- type DeleteUserDataOperation
- type GetUserDataOperation
- type ListUserDataOperation
- type UpdateUserDataOperation
- type UserData
- type UserDataList
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCreateCmd ¶
func NewDeleteCmd ¶
func NewListCmd ¶
func NewUpdateCmd ¶
func RegisterContentFlags ¶
RegisterContentFlags adds the mutually-exclusive content flags.
func ResolveContent ¶
ResolveContent returns the base64-encoded content to send to the API.
The API stores user data content base64-encoded. To keep the CLI friendly, --content takes plain text and is encoded here; --content-base64 takes a value that is already encoded and is passed through unchanged (useful for piping file contents that are not valid UTF-8 text on the shell).
It is shared with the project-scoped commands (cmd/projectuserdata), which operate on the same resource.
Types ¶
type CreateUserDataOperation ¶
type CreateUserDataOperation struct{}
type DeleteUserDataOperation ¶
type DeleteUserDataOperation struct{}
type GetUserDataOperation ¶
type GetUserDataOperation struct{}
type ListUserDataOperation ¶
type ListUserDataOperation struct{}
type UpdateUserDataOperation ¶
type UpdateUserDataOperation struct{}
type UserData ¶
type UserData struct {
components.UserDataProperties
}
UserData wraps the SDK's UserDataProperties so it can be rendered as a table row or serialized through the shared renderer. It backs both the account-scoped (`lsh user-data`) and project-scoped (`lsh projects user-data`) commands, which return the same underlying resource.
func (*UserData) DecodedContent ¶
DecodedContent returns the entry's content decoded from base64, falling back to the raw value when it is not valid base64.
func (*UserData) DetailFields ¶
DetailFields exposes the fields shown only in the details view: the project association and the decoded cloud-init content.
func (*UserData) DetailView ¶
func (m *UserData) DetailView() renderer.DetailView
DetailView describes how user data is titled in the interactive views.
func (*UserData) GetData ¶
func (m *UserData) GetData() []renderer.ResponseData
type UserDataList ¶
type UserDataList struct {
Data []*UserData
}
UserDataList is a renderable collection of user data entries.
func (*UserDataList) GetData ¶
func (m *UserDataList) GetData() []renderer.ResponseData