Documentation ¶
Index ¶
- func Bool(v bool) *bool
- func CheckResponse(r *http.Response) error
- func DoRequest(ctx context.Context, req *http.Request) (*http.Response, error)
- func DoRequestWithClient(ctx context.Context, client *http.Client, req *http.Request) (*http.Response, error)
- func Int(v int) *int
- func String(v string) *string
- type ActivationKey
- type ActivationKeyAvailableHostCollectionsListOptions
- type ActivationKeyContentOverride
- type ActivationKeyCreate
- type ActivationKeyList
- type ActivationKeyListOptions
- type ActivationKeyProductContentList
- type ActivationKeyReleasesList
- type ActivationKeyUpdate
- type ActivationKeys
- type ActivationKeysOp
- func (s *ActivationKeysOp) AssociateHostCollections(ctx context.Context, akID int, hostCollections []int) (*ActivationKey, *http.Response, error)
- func (s *ActivationKeysOp) AttachSubscription(ctx context.Context, akID int, subscriptionID int, quantity int) (*ActivationKey, *http.Response, error)
- func (s *ActivationKeysOp) ContentOverride(ctx context.Context, akID int, contentOverride ActivationKeyContentOverride) (*ActivationKey, *http.Response, error)
- func (s *ActivationKeysOp) Create(ctx context.Context, akCreate ActivationKeyCreate) (*ActivationKey, *http.Response, error)
- func (s *ActivationKeysOp) Delete(ctx context.Context, akID int) (*http.Response, error)
- func (s *ActivationKeysOp) DisassociateHostCollections(ctx context.Context, akID int, hostCollections []int) (*ActivationKey, *http.Response, error)
- func (s *ActivationKeysOp) Get(ctx context.Context, akID int) (*ActivationKey, *http.Response, error)
- func (s *ActivationKeysOp) List(ctx context.Context, opt *ActivationKeyListOptions) (*ActivationKeyList, *http.Response, error)
- func (s *ActivationKeysOp) ListByEnvironmentID(ctx context.Context, envID int, opt *ActivationKeyListOptions) (*ActivationKeyList, *http.Response, error)
- func (s *ActivationKeysOp) ListByOrganizationID(ctx context.Context, orgID int, opt *ActivationKeyListOptions) (*ActivationKeyList, *http.Response, error)
- func (s *ActivationKeysOp) ListReleases(ctx context.Context, akID int) (*ActivationKeyReleasesList, *http.Response, error)
- func (s *ActivationKeysOp) UnattachSubscription(ctx context.Context, akID int, subscriptionID int) (*ActivationKey, *http.Response, error)
- func (s *ActivationKeysOp) Update(ctx context.Context, akID int, akUpdate ActivationKeyUpdate) (*ActivationKey, *http.Response, error)
- type ArgError
- type AuthSourceLDAP
- type AuthSourceLDAPList
- type AuthSourceLDAPs
- type AuthSourceLDAPsListOptions
- type AuthSourceLDAPsOp
- func (s *AuthSourceLDAPsOp) List(ctx context.Context, opt *AuthSourceLDAPsListOptions) (*AuthSourceLDAPList, *http.Response, error)
- func (s *AuthSourceLDAPsOp) ListByLocationID(ctx context.Context, locID int, opt *AuthSourceLDAPsListOptions) (*AuthSourceLDAPList, *http.Response, error)
- func (s *AuthSourceLDAPsOp) ListByOrganizationID(ctx context.Context, orgID int, opt *AuthSourceLDAPsListOptions) (*AuthSourceLDAPList, *http.Response, error)
- type Client
- func (c *Client) Do(ctx context.Context, req *http.Request, v interface{}) (*http.Response, error)
- func (c *Client) NewManifestUploadRequest(ctx context.Context, method, urlStr string, manifest []byte, ...) (*http.Request, error)
- func (c *Client) NewRequest(ctx context.Context, method, urlStr string, body interface{}) (*http.Request, error)
- func (c *Client) OnRequestCompleted(rc RequestCompletionCallback)
- type Config
- type ContentView
- type ContentViews
- type ContentViewsList
- type ContentViewsListOptions
- type ContentViewsOp
- type ErrorResponse
- type ExternalUserGroup
- type ExternalUserGroup2
- type ExternalUserGroupCreate
- type ExternalUserGroupUpdate
- type ExternalUserGroups
- type ExternalUserGroupsOp
- func (s *ExternalUserGroupsOp) Create(ctx context.Context, userGroupID int, ...) (*ExternalUserGroup, *http.Response, error)
- func (s *ExternalUserGroupsOp) Delete(ctx context.Context, userGroupID int, externalUserGroupID int) (*ExternalUserGroup2, *http.Response, error)
- func (s *ExternalUserGroupsOp) Get(ctx context.Context, userGroupID int, externalUserGroupID int) (*ExternalUserGroup, *http.Response, error)
- func (s *ExternalUserGroupsOp) Update(ctx context.Context, userGroupID int, externalUserGroupID int, ...) (*ExternalUserGroup, *http.Response, error)
- type Filter
- type FilterCreate
- type FilterUpdate
- type Filters
- type FiltersOp
- func (s *FiltersOp) Create(ctx context.Context, filterCreate FilterCreate) (*Filter, *http.Response, error)
- func (s *FiltersOp) Delete(ctx context.Context, filterID int) (*http.Response, error)
- func (s *FiltersOp) Get(ctx context.Context, filterID int) (*Filter, *http.Response, error)
- func (s *FiltersOp) Update(ctx context.Context, filterID int, filterUpdate FilterUpdate) (*Filter, *http.Response, error)
- type HostCollection
- type HostCollectionCreate
- type HostCollectionUpdate
- type HostCollections
- type HostCollectionsOp
- func (s *HostCollectionsOp) Create(ctx context.Context, orgID int, hcCreate HostCollectionCreate) (*HostCollection, *http.Response, error)
- func (s *HostCollectionsOp) Delete(ctx context.Context, hcID int) (*http.Response, error)
- func (s *HostCollectionsOp) Get(ctx context.Context, hcID int) (*HostCollection, *http.Response, error)
- func (s *HostCollectionsOp) Update(ctx context.Context, hcID int, hcUpdate HostCollectionUpdate) (*HostCollection, *http.Response, error)
- type KatelloListOptions
- type LifecycleEnvironment
- type LifecycleEnvironments
- type LifecycleEnvironmentsList
- type LifecycleEnvironmentsListOptions
- type LifecycleEnvironmentsOp
- func (s *LifecycleEnvironmentsOp) List(ctx context.Context, opt *LifecycleEnvironmentsListOptions) (*LifecycleEnvironmentsList, *http.Response, error)
- func (s *LifecycleEnvironmentsOp) ListByOrganizationID(ctx context.Context, orgID int, opt *LifecycleEnvironmentsListOptions) (*LifecycleEnvironmentsList, *http.Response, error)
- type ListOptions
- type Location
- type LocationCreate
- type LocationUpdate
- type Locations
- type LocationsList
- type LocationsListOptions
- type LocationsOp
- func (s *LocationsOp) Create(ctx context.Context, locCreate LocationCreate) (*Location, *http.Response, error)
- func (s *LocationsOp) Delete(ctx context.Context, locationID int) (*http.Response, error)
- func (s *LocationsOp) Get(ctx context.Context, locationID int) (*Location, *http.Response, error)
- func (s *LocationsOp) List(ctx context.Context, opt *LocationsListOptions) (*LocationsList, *http.Response, error)
- func (s *LocationsOp) Update(ctx context.Context, locationID int, update LocationUpdate) (*Location, *http.Response, error)
- type ManifestHistoryItem
- type ManifestUpload
- type Manifests
- type ManifestsOp
- func (s *ManifestsOp) Delete(ctx context.Context, orgID int) (*http.Response, error)
- func (s *ManifestsOp) GetHistory(ctx context.Context, orgID int) (*[]ManifestHistoryItem, *http.Response, error)
- func (s *ManifestsOp) Refresh(ctx context.Context, orgID int) (*http.Response, error)
- func (s *ManifestsOp) Upload(ctx context.Context, orgID int, repoURL *string, manifest []byte, ...) (*ManifestUpload, *http.Response, error)
- type Organization
- type OrganizationCreate
- type OrganizationShort
- type OrganizationUpdate
- type Organizations
- type OrganizationsList
- type OrganizationsListOptions
- type OrganizationsOp
- func (s *OrganizationsOp) Create(ctx context.Context, orgCreate OrganizationCreate) (*Organization, *http.Response, error)
- func (s *OrganizationsOp) Delete(ctx context.Context, orgID int) (*http.Response, error)
- func (s *OrganizationsOp) Get(ctx context.Context, orgID int) (*Organization, *http.Response, error)
- func (s *OrganizationsOp) List(ctx context.Context, opt *OrganizationsListOptions) (*OrganizationsList, *http.Response, error)
- func (s *OrganizationsOp) Update(ctx context.Context, orgID int, update OrganizationUpdate) (*Organization, *http.Response, error)
- type Permission
- type Permissions
- type PermissionsList
- type PermissionsListOptions
- type PermissionsOp
- type Product
- type Products
- type ProductsList
- type ProductsListOptions
- type ProductsOp
- type Repositories
- type RepositoriesList
- type RepositoriesListOptions
- type RepositoriesOp
- type Repository
- type RequestCompletionCallback
- type ResourceTypes
- type Role
- type RoleCreate
- type RoleUpdate
- type Roles
- type RolesOp
- func (s *RolesOp) Create(ctx context.Context, roleCreate RoleCreate) (*Role, *http.Response, error)
- func (s *RolesOp) Delete(ctx context.Context, roleID int) (*http.Response, error)
- func (s *RolesOp) Get(ctx context.Context, roleID int) (*Role, *http.Response, error)
- func (s *RolesOp) Update(ctx context.Context, roleID int, roleUpdate RoleUpdate) (*Role, *http.Response, error)
- type UserGroup
- type UserGroupCreate
- type UserGroupUpdate
- type UserGroups
- type UserGroupsOp
- func (s *UserGroupsOp) Create(ctx context.Context, userGroupCreate UserGroupCreate) (*UserGroup, *http.Response, error)
- func (s *UserGroupsOp) Delete(ctx context.Context, userGroupID int) (*UserGroup, *http.Response, error)
- func (s *UserGroupsOp) Get(ctx context.Context, userGroupID int) (*UserGroup, *http.Response, error)
- func (s *UserGroupsOp) Update(ctx context.Context, userGroupID int, userGroupUpdate UserGroupUpdate) (*UserGroup, *http.Response, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Bool ¶
Bool is a helper routine that allocates a new bool value to store v and returns a pointer to it.
func CheckResponse ¶
CheckResponse checks the API response for errors, and returns them if present. A response is considered an error if it has a status code outside the 200 range. API error responses are expected to have either no response body, or a JSON response body that maps to ErrorResponse. Any other response body will be silently ignored.
func DoRequestWithClient ¶
func DoRequestWithClient( ctx context.Context, client *http.Client, req *http.Request) (*http.Response, error)
DoRequestWithClient submits an HTTP request using the specified client.
Types ¶
type ActivationKey ¶
type ActivationKey struct { AutoAttach *bool `json:"auto_attach"` ContentOverrides *[]akContentOverrides `json:"content_overrides"` ContentView *genericShortRef `json:"content_view"` ContentViewID *int `json:"content_view_id"` CreatedAt *string `json:"created_at"` Description *string `json:"description"` Environment *genericShortRef `json:"environment"` EnvironmentID *int `json:"environment_id"` HostCollections *[]genericShortRef `json:"host_collections"` ID *int `json:"id"` MaxHosts *int `json:"max_hosts"` Name *string `json:"name"` Organization *shortOrg `json:"organization"` OrganizationID *int `json:"organization_id"` Permissions *akPermissions `json:"permissions"` Products *[]genericShortRef `json:"products"` ReleaseVersion *string `json:"release_version"` ServiceLevel *string `json:"service_level"` UnlimitedHosts *bool `json:"unlimited_hosts"` UpdatedAt *string `json:"updated_at"` UsageCount *int `json:"usage_count"` UserID *int `json:"user_id"` }
ActivationKey defines model for an Activation Key.
type ActivationKeyAvailableHostCollectionsListOptions ¶
type ActivationKeyAvailableHostCollectionsListOptions struct { KatelloListOptions // Filter by content view id ContentViewID int `url:"content_view_id,omitempty"` // Scope by environment EnvironmentID int `url:"environment_id,omitempty"` // Filter by name Name string `url:"name,omitempty"` // Scope by organizations OrganizationID int `url:"organization_id,omitempty"` }
ActivationKeyAvailableHostCollectionsListOptions specifies the optional parameters to various List methods that support pagination.
type ActivationKeyContentOverride ¶
type ActivationKeyContentOverride struct { ContentOverrides struct { ContentLabel *string `json:"content_label"` Value *string `json:"value,omitempty"` Name *string `json:"name,omitempty"` Remove *bool `json:"remove,omitempty"` } `json:"content_overrides"` }
ActivationKeyContentOverride defines model for defining a content override for an activation key.
type ActivationKeyCreate ¶
type ActivationKeyCreate struct { OrganizationID *int `json:"organization_id"` Name *string `json:"name"` Description *string `json:"description,omitempty"` EnvironmentID *int `json:"environment_id,omitempty"` ContentViewID *int `json:"content_view_id,omitempty"` MaxHosts *int `json:"max_hosts,omitempty"` UnlimitedHosts *bool `json:"unlimited_hosts,omitempty"` }
ActivationKeyCreate defines model for creating an activation key.
type ActivationKeyList ¶
type ActivationKeyList struct { Error *string `json:"error"` Results *[]ActivationKey `json:"results"` // contains filtered or unexported fields }
ActivationKeyList defines model for a list of activation keys.
type ActivationKeyListOptions ¶
type ActivationKeyListOptions struct { KatelloListOptions // Filter by content view id ContentViewID int `url:"content_view_id,omitempty"` // Scope by environment EnvironmentID int `url:"environment_id,omitempty"` // Filter by name Name string `url:"name,omitempty"` // Scope by organizations OrganizationID int `url:"organization_id,omitempty"` }
ActivationKeyListOptions specifies the optional parameters to various List methods that support pagination.
type ActivationKeyProductContentList ¶
type ActivationKeyProductContentList struct { Error *string `json:"error"` Results *[]string `json:"results"` // contains filtered or unexported fields }
ActivationKeyProductContentList defines model for a list of products available for an activation keys.
type ActivationKeyReleasesList ¶
type ActivationKeyReleasesList struct { Error *string `json:"error"` Results *[]string `json:"results"` // contains filtered or unexported fields }
ActivationKeyReleasesList defines model for a list of releases available for an activation keys.
type ActivationKeyUpdate ¶
type ActivationKeyUpdate struct { OrganizationID *int `json:"organization_id,omitempty"` Name *string `json:"name,omitempty"` Description *string `json:"description,omitempty"` EnvironmentID *int `json:"environment_id,omitempty"` ContentViewID *int `json:"content_view_id,omitempty"` MaxHosts *int `json:"max_hosts,omitempty"` UnlimitedHosts *bool `json:"unlimited_hosts,omitempty"` ReleaseVersion *string `json:"release_version,omitempty"` ServiceLevel *string `json:"service_level,omitempty"` AutoAttach *bool `json:"auto_attach,omitempty"` }
ActivationKeyUpdate defines model for updating an activation key.
type ActivationKeys ¶
type ActivationKeys interface { AssociateHostCollections(ctx context.Context, akID int, hostCollections []int) (*ActivationKey, *http.Response, error) AttachSubscription(ctx context.Context, akID int, subscriptionID int, quantity int) (*ActivationKey, *http.Response, error) ContentOverride(ctx context.Context, akID int, contentOverride ActivationKeyContentOverride) (*ActivationKey, *http.Response, error) Create(ctx context.Context, akCreate ActivationKeyCreate) (*ActivationKey, *http.Response, error) Delete(ctx context.Context, akID int) (*http.Response, error) DisassociateHostCollections(ctx context.Context, akID int, hostCollections []int) (*ActivationKey, *http.Response, error) Get(ctx context.Context, akID int) (*ActivationKey, *http.Response, error) List(ctx context.Context, opt *ActivationKeyListOptions) (*ActivationKeyList, *http.Response, error) ListByEnvironmentID(ctx context.Context, envID int, opt *ActivationKeyListOptions) (*ActivationKeyList, *http.Response, error) ListByOrganizationID(ctx context.Context, orgID int, opt *ActivationKeyListOptions) (*ActivationKeyList, *http.Response, error) ListReleases(ctx context.Context, akID int) (*ActivationKeyReleasesList, *http.Response, error) Update(ctx context.Context, akID int, akUpdate ActivationKeyUpdate) (*ActivationKey, *http.Response, error) UnattachSubscription(ctx context.Context, akID int, subscriptionID int) (*ActivationKey, *http.Response, error) }
ActivationKeys is an interface for interacting with Red Hat Satellite Activation Keys
type ActivationKeysOp ¶
type ActivationKeysOp struct {
// contains filtered or unexported fields
}
ActivationKeysOp handles communication with the ActivationKey related methods of the Red Hat Satellite REST API
func (*ActivationKeysOp) AssociateHostCollections ¶
func (s *ActivationKeysOp) AssociateHostCollections(ctx context.Context, akID int, hostCollections []int) (*ActivationKey, *http.Response, error)
AssociateHostCollections with an activation key
func (*ActivationKeysOp) AttachSubscription ¶
func (s *ActivationKeysOp) AttachSubscription(ctx context.Context, akID int, subscriptionID int, quantity int) (*ActivationKey, *http.Response, error)
AttachSubscription attaches a subscription to an activation key
func (*ActivationKeysOp) ContentOverride ¶
func (s *ActivationKeysOp) ContentOverride(ctx context.Context, akID int, contentOverride ActivationKeyContentOverride) (*ActivationKey, *http.Response, error)
ContentOverride overrides the content an activation key
func (*ActivationKeysOp) Create ¶
func (s *ActivationKeysOp) Create(ctx context.Context, akCreate ActivationKeyCreate) (*ActivationKey, *http.Response, error)
Create a new activation key
func (*ActivationKeysOp) DisassociateHostCollections ¶
func (s *ActivationKeysOp) DisassociateHostCollections(ctx context.Context, akID int, hostCollections []int) (*ActivationKey, *http.Response, error)
DisassociateHostCollections disassociates a list of host collections with an activation key
func (*ActivationKeysOp) Get ¶
func (s *ActivationKeysOp) Get(ctx context.Context, akID int) (*ActivationKey, *http.Response, error)
Get a single activation key by its ID
func (*ActivationKeysOp) List ¶
func (s *ActivationKeysOp) List(ctx context.Context, opt *ActivationKeyListOptions) (*ActivationKeyList, *http.Response, error)
List all activation keys or a filtered list of activation keys
func (*ActivationKeysOp) ListByEnvironmentID ¶
func (s *ActivationKeysOp) ListByEnvironmentID(ctx context.Context, envID int, opt *ActivationKeyListOptions) (*ActivationKeyList, *http.Response, error)
ListByEnvironmentID gets all activation keys or a filtered list of activation keys for a specific environment
func (*ActivationKeysOp) ListByOrganizationID ¶
func (s *ActivationKeysOp) ListByOrganizationID(ctx context.Context, orgID int, opt *ActivationKeyListOptions) (*ActivationKeyList, *http.Response, error)
ListByOrganizationID gets all activation keys or a filtered list of activation keys for a specific organization
func (*ActivationKeysOp) ListReleases ¶
func (s *ActivationKeysOp) ListReleases(ctx context.Context, akID int) (*ActivationKeyReleasesList, *http.Response, error)
ListReleases for an activation key
func (*ActivationKeysOp) UnattachSubscription ¶
func (s *ActivationKeysOp) UnattachSubscription(ctx context.Context, akID int, subscriptionID int) (*ActivationKey, *http.Response, error)
UnattachSubscription detaches a subscription from an activation key
func (*ActivationKeysOp) Update ¶
func (s *ActivationKeysOp) Update(ctx context.Context, akID int, akUpdate ActivationKeyUpdate) (*ActivationKey, *http.Response, error)
Update an activation key
type ArgError ¶
type ArgError struct {
// contains filtered or unexported fields
}
ArgError is an error that represents an error with an input to godo. It identifies the argument and the cause (if possible).
func NewArgError ¶
NewArgError creates an InputError.
type AuthSourceLDAP ¶
type AuthSourceLDAP struct { Host *string `json:"host"` Port *int `json:"port"` Account *string `json:"account"` BaseDN *string `json:"base_dn"` LDAPFilter *string `json:"ldap_filter"` AttrLogin *string `json:"attr_login"` AttrFirstName *string `json:"attr_firstname"` AttrLastName *string `json:"attr_lastname"` AttrMail *string `json:"attr_mail"` AttrPhoto *string `json:"attr_photo"` OnTheFlyRegister *bool `json:"onthefly_register"` UserGroupSync *bool `json:"usergroup_sync"` TLS *bool `json:"tls"` ServerType *string `json:"server_type"` GroupsBase *string `json:"groups_base"` UseNetGroups *bool `json:"use_netgroups"` CreatedAt *string `json:"created_at"` UpdatedAt *string `json:"updated_at"` ID *int `json:"id"` Type *string `json:"type"` Name *string `json:"name"` ExternalUserGroups *[]genericShortRef `json:"external_usergroups"` Locations *[]genericReference `json:"locations"` Organizations *[]genericReference `json:"organizations"` }
AuthSourceLDAP defines model for an LDAP authentication source.
type AuthSourceLDAPList ¶
type AuthSourceLDAPList struct { Results *[]AuthSourceLDAP `json:"results"` // contains filtered or unexported fields }
AuthSourceLDAPList defines model for a list of LDAP authentication sources.
type AuthSourceLDAPs ¶
type AuthSourceLDAPs interface { List(ctx context.Context, opt *AuthSourceLDAPsListOptions) (*AuthSourceLDAPList, *http.Response, error) ListByLocationID(ctx context.Context, locID int, opt *AuthSourceLDAPsListOptions) (*AuthSourceLDAPList, *http.Response, error) ListByOrganizationID(ctx context.Context, orgID int, opt *AuthSourceLDAPsListOptions) (*AuthSourceLDAPList, *http.Response, error) }
AuthSourceLDAPs is an interface for interacting with Red Hat Satellite Auth Source LDAPs
type AuthSourceLDAPsListOptions ¶
type AuthSourceLDAPsListOptions struct { ListOptions // Scope by locations LocationID int `url:"location_id,omitempty"` // Scope by organizations OrganizationID int `url:"organization_id,omitempty"` }
AuthSourceLDAPsListOptions specifies the optional parameters to various List methods that support pagination.
type AuthSourceLDAPsOp ¶
type AuthSourceLDAPsOp struct {
// contains filtered or unexported fields
}
AuthSourceLDAPsOp handles communication with the LDAP authentication source related methods of the Red Hat Satellite REST API
func (*AuthSourceLDAPsOp) List ¶
func (s *AuthSourceLDAPsOp) List(ctx context.Context, opt *AuthSourceLDAPsListOptions) (*AuthSourceLDAPList, *http.Response, error)
List all LDAP Authentication Sources or a filtered list of LDAP Authentication Sources
func (*AuthSourceLDAPsOp) ListByLocationID ¶
func (s *AuthSourceLDAPsOp) ListByLocationID(ctx context.Context, locID int, opt *AuthSourceLDAPsListOptions) (*AuthSourceLDAPList, *http.Response, error)
ListByLocationID all LDAP Authentication Sources or a filtered list of LDAP Authentication Sources
func (*AuthSourceLDAPsOp) ListByOrganizationID ¶
func (s *AuthSourceLDAPsOp) ListByOrganizationID(ctx context.Context, orgID int, opt *AuthSourceLDAPsListOptions) (*AuthSourceLDAPList, *http.Response, error)
ListByOrganizationID all LDAP Authentication Sources or a filtered list of LDAP Authentication Sources
type Client ¶
type Client struct { // Config for the client such as the satellite hostname and credentials Config *Config // Base URL for API requests. BaseURL *url.URL // User agent for client UserAgent string // Services used for communicating with the API ActivationKeys ActivationKeys AuthSourceLDAPs AuthSourceLDAPs ContentViews ContentViews ExternalUserGroups ExternalUserGroups Filters Filters HostCollections HostCollections LifecycleEnvironments LifecycleEnvironments Locations Locations Manifests Manifests Organizations Organizations Permissions Permissions Products Products Repositories Repositories Roles Roles UserGroups UserGroups // contains filtered or unexported fields }
Client is the API client for Red Hat Satellite
func (*Client) Do ¶
Do sends an API request and returns the API response. The API response is JSON decoded and stored in the value pointed to by v, or returned as an error if an API error has occurred. If v implements the io.Writer interface, the raw response will be written to v, without attempting to decode it.
func (*Client) NewManifestUploadRequest ¶
func (c *Client) NewManifestUploadRequest(ctx context.Context, method, urlStr string, manifest []byte, manifestFilename string) (*http.Request, error)
NewManifestUploadRequest creates an API request. A relative URL can be provided in urlStr, which will be resolved to the BaseURL of the Client. Relative URLS should always be specified without a preceding slash. The content in form is added to the request as form data
func (*Client) NewRequest ¶
func (c *Client) NewRequest(ctx context.Context, method, urlStr string, body interface{}) (*http.Request, error)
NewRequest creates an API request. A relative URL can be provided in urlStr, which will be resolved to the BaseURL of the Client. Relative URLS should always be specified without a preceding slash. If specified, the value pointed to by body is JSON encoded and included in as the request body.
func (*Client) OnRequestCompleted ¶
func (c *Client) OnRequestCompleted(rc RequestCompletionCallback)
OnRequestCompleted sets the Red Hat Satellite API request completion callback
type ContentView ¶
type ContentView struct { Composite *bool `json:"composite"` ComponentIDs *[]int `json:"component_ids"` Default *bool `json:"default"` ForcePuppetEnvironment *bool `json:"force_puppet_environment"` VersionCount *int `json:"version_count"` LatestVersion *string `json:"latest_version"` AutoPublish *bool `json:"auto_publish"` SolveDependencies *bool `json:"solve_dependencies"` RepositoryIDs *[]int `json:"repository_ids"` ID *int `json:"id"` Name *string `json:"name"` Label *string `json:"label"` Description *string `json:"description"` OrganizationID *int `json:"organization_id"` Organization *shortOrg `json:"organization"` CreatedAt *string `json:"created_at"` UpdatedAt *string `json:"updated_at"` Environments *[]shortLE `json:"environments"` Repositories *[]shortRepository `json:"repositories"` Versions *[]cvVersions `json:"versions"` ActivationKeys *[]genericShortRef `json:"activation_keys"` NextVersion *string `json:"next_version"` LastPublished *string `json:"last_published"` Permissions *cvPermissions `json:"permissions"` }
ContentView defines model for a Content View.
type ContentViews ¶
type ContentViews interface { List(ctx context.Context, opt *ContentViewsListOptions) (*ContentViewsList, *http.Response, error) ListByOrganizationID(ctx context.Context, orgID int, opt *ContentViewsListOptions) (*ContentViewsList, *http.Response, error) }
ContentViews is an interface for interacting with Red Hat Satellite Content Views
type ContentViewsList ¶
type ContentViewsList struct { Results *[]ContentView `json:"results"` // contains filtered or unexported fields }
ContentViewsList defines model for a list of Content Views.
type ContentViewsListOptions ¶
type ContentViewsListOptions struct { KatelloListOptions // organization identifier OrganizationID int `url:"organization_id,omitempty"` // environment identifier EnvironmentID int `url:"environment_id,omitempty"` // Filter out default content views Nondefault bool `url:"nondefault,omitempty"` // Filter out composite content views Noncomposite bool `url:"noncomposite,omitempty"` // Filter only composite content views Composite bool `url:"composite,omitempty"` // Do not include this array of content views Without []string `url:"without,omitempty"` // Name of the content view Name string `url:"name,omitempty"` }
ContentViewsListOptions specifies the optional parameters to various List methods that support pagination.
type ContentViewsOp ¶
type ContentViewsOp struct {
// contains filtered or unexported fields
}
ContentViewsOp handles communication with the Content Views related methods of the Red Hat Satellite REST API
func (*ContentViewsOp) List ¶
func (s *ContentViewsOp) List(ctx context.Context, opt *ContentViewsListOptions) (*ContentViewsList, *http.Response, error)
List all Content Views or a filtered list of Content Views
func (*ContentViewsOp) ListByOrganizationID ¶
func (s *ContentViewsOp) ListByOrganizationID(ctx context.Context, orgID int, opt *ContentViewsListOptions) (*ContentViewsList, *http.Response, error)
ListByOrganizationID all Content Views in an organization or a filtered list of Content Views in an organization
type ErrorResponse ¶
type ErrorResponse struct { // HTTP response that caused this error Response *http.Response // Error message ErrorStruct *struct { FullMessages *[]string `json:"full_messages"` Message *string `json:"message"` } `json:"error"` }
An ErrorResponse reports the error caused by an API request
func (*ErrorResponse) Error ¶
func (r *ErrorResponse) Error() string
type ExternalUserGroup ¶
type ExternalUserGroup struct { ID *int `json:"id"` Name *string `json:"name"` AuthSourceLDAP *genericAuthSourceLDAP `json:"auth_source_ldap"` }
ExternalUserGroup defines model for an External User Group.
type ExternalUserGroup2 ¶
type ExternalUserGroup2 struct { ID *int `json:"id"` Name *string `json:"name"` AuthSourceID *int `json:"auth_source_id"` UserGroupID *int `json:"usergroup_id"` }
ExternalUserGroup2 defines model for an External User Group.
type ExternalUserGroupCreate ¶
type ExternalUserGroupCreate struct { ExternalUserGroup struct { Name *string `json:"name"` AuthSourceID *int `json:"auth_source_id"` } `json:"external_usergroup"` }
ExternalUserGroupCreate defines model for the body of the creation of an external user group.
type ExternalUserGroupUpdate ¶
type ExternalUserGroupUpdate struct { ExternalUserGroup struct { Name *string `json:"name,omitempty"` AuthSourceID *int `json:"auth_source_id,omitempty"` } `json:"external_usergroup"` }
ExternalUserGroupUpdate defines model for the body of the update of an external user group.
type ExternalUserGroups ¶
type ExternalUserGroups interface { Create(ctx context.Context, userGroupID int, externalUserGroupCreate ExternalUserGroupCreate) (*ExternalUserGroup, *http.Response, error) Delete(ctx context.Context, userGroupID int, externalUserGroupID int) (*ExternalUserGroup2, *http.Response, error) Get(ctx context.Context, userGroupID int, externalUserGroupID int) (*ExternalUserGroup, *http.Response, error) Update(ctx context.Context, userGroupID int, externalUserGroupID int, externalUserGroupUpdate ExternalUserGroupUpdate) (*ExternalUserGroup, *http.Response, error) }
ExternalUserGroups is an interface for interacting with Red Hat Satellite external user groups
type ExternalUserGroupsOp ¶
type ExternalUserGroupsOp struct {
// contains filtered or unexported fields
}
ExternalUserGroupsOp handles communication with the External User Group related methods of the Red Hat Satellite REST API
func (*ExternalUserGroupsOp) Create ¶
func (s *ExternalUserGroupsOp) Create(ctx context.Context, userGroupID int, externalUserGroupCreate ExternalUserGroupCreate) (*ExternalUserGroup, *http.Response, error)
Create an external user group linked to a user group
func (*ExternalUserGroupsOp) Delete ¶
func (s *ExternalUserGroupsOp) Delete(ctx context.Context, userGroupID int, externalUserGroupID int) (*ExternalUserGroup2, *http.Response, error)
Delete an external user group by its ID
func (*ExternalUserGroupsOp) Get ¶
func (s *ExternalUserGroupsOp) Get(ctx context.Context, userGroupID int, externalUserGroupID int) (*ExternalUserGroup, *http.Response, error)
Get an external user group by its ID
func (*ExternalUserGroupsOp) Update ¶
func (s *ExternalUserGroupsOp) Update(ctx context.Context, userGroupID int, externalUserGroupID int, externalUserGroupUpdate ExternalUserGroupUpdate) (*ExternalUserGroup, *http.Response, error)
Update an external user group
type Filter ¶
type Filter struct { CreatedAt *string `json:"created_at"` ID *int `json:"id"` Locations *[]genericReference `json:"locations"` Organizations *[]genericReference `json:"organizations"` Override *bool `json:"override?"` Permissions *[]filterPermission `json:"permissions"` ResourceType *string `json:"resource_type"` Role *filterRole `json:"role"` Search *string `json:"search"` Unlimited *bool `json:"unlimited?"` UpdatedAt *string `json:"updated_at"` }
Filter defines model for a Filter.
type FilterCreate ¶
type FilterCreate struct { Filter struct { RoleID *int `json:"role_id"` Search *string `json:"search,omitempty"` Override *bool `json:"override,omitempty"` PermissionIDs *[]int `json:"permission_ids,omitempty"` OrganizationIDs *[]int `json:"organization_ids,omitempty"` LocationIDs *[]int `json:"location_ids,omitempty"` } `json:"filter"` }
FilterCreate defines model for the body of the creation of a filter.
type FilterUpdate ¶
type FilterUpdate struct { Filter struct { RoleID *int `json:"role_id,omitempty"` Search *string `json:"search,omitempty"` Override *bool `json:"override,omitempty"` PermissionIDs *[]int `json:"permission_ids,omitempty"` OrganizationIDs *[]int `json:"organization_ids,omitempty"` LocationIDs *[]int `json:"location_ids,omitempty"` } `json:"filter"` }
FilterUpdate defines model for the body of the update of a filter.
type Filters ¶
type Filters interface { Create(ctx context.Context, filterCreate FilterCreate) (*Filter, *http.Response, error) Delete(ctx context.Context, filterID int) (*http.Response, error) Get(ctx context.Context, filterID int) (*Filter, *http.Response, error) Update(ctx context.Context, filterID int, filterUpdate FilterUpdate) (*Filter, *http.Response, error) }
Filters is an interface for interacting with Red Hat Satellite role filters
type FiltersOp ¶
type FiltersOp struct {
// contains filtered or unexported fields
}
FiltersOp handles communication with the Filter related methods of the Red Hat Satellite REST API
func (*FiltersOp) Create ¶
func (s *FiltersOp) Create(ctx context.Context, filterCreate FilterCreate) (*Filter, *http.Response, error)
Create a new filter
type HostCollection ¶
type HostCollection struct { CreatedAt *string `json:"created_at"` Description *string `json:"description"` HostIDs *[]int `json:"host_ids"` ID *int `json:"id"` MaxHosts *int `json:"max_hosts"` Name *string `json:"name"` OrganizationID *int `json:"organization_id"` Permissions *hcPermissions `json:"permissions"` TotalHosts *int `json:"total_hosts"` UnlimitedHosts *bool `json:"unlimited_hosts"` UpdatedAt *string `json:"updated_at"` }
HostCollection defines model for a Host Collection.
type HostCollectionCreate ¶
type HostCollectionCreate struct { Name string `json:"name"` Description *string `json:"description,omitempty"` HostIDs *[]int `json:"host_ids,omitempty"` MaxHosts *int `json:"max_hosts,omitempty"` UnlimitedHosts *bool `json:"unlimited_hosts,omitempty"` }
HostCollectionCreate defines model for creating a host collection.
type HostCollectionUpdate ¶
type HostCollectionUpdate struct { Name *string `json:"name,omitempty"` Description *string `json:"description,omitempty"` HostIDs *[]int `json:"host_ids,omitempty"` MaxHosts *int `json:"max_hosts,omitempty"` UnlimitedHosts *bool `json:"unlimited_hosts,omitempty"` }
HostCollectionUpdate defines model for updating a host collection.
type HostCollections ¶
type HostCollections interface { Create(ctx context.Context, orgID int, hcCreate HostCollectionCreate) (*HostCollection, *http.Response, error) Delete(ctx context.Context, hcID int) (*http.Response, error) Get(ctx context.Context, hcID int) (*HostCollection, *http.Response, error) Update(ctx context.Context, hcID int, hcUpdate HostCollectionUpdate) (*HostCollection, *http.Response, error) }
HostCollections is an interface for interacting with Red Hat Satellite Host Collections
type HostCollectionsOp ¶
type HostCollectionsOp struct {
// contains filtered or unexported fields
}
HostCollectionsOp handles communication with the Host Collection related methods of the Red Hat Satellite REST API
func (*HostCollectionsOp) Create ¶
func (s *HostCollectionsOp) Create(ctx context.Context, orgID int, hcCreate HostCollectionCreate) (*HostCollection, *http.Response, error)
Create a new host collection
func (*HostCollectionsOp) Get ¶
func (s *HostCollectionsOp) Get(ctx context.Context, hcID int) (*HostCollection, *http.Response, error)
Get a host collection by its ID
func (*HostCollectionsOp) Update ¶
func (s *HostCollectionsOp) Update(ctx context.Context, hcID int, hcUpdate HostCollectionUpdate) (*HostCollection, *http.Response, error)
Update a host collection
type KatelloListOptions ¶
type KatelloListOptions struct { ListOptions // Whether or not to show all results FullResult *bool `url:"full_result,omitempty"` // Field to sort the results on SortBy string `url:"sort_by,omitempty"` // How to order the sorted results (e.g. ASC for ascending) SortOrder string `url:"sort_order,omitempty"` }
KatelloListOptions specifies the optional parameters to various List methods that support pagination for APIs backed by Katello.
type LifecycleEnvironment ¶
type LifecycleEnvironment struct { Library *bool `json:"library"` RegistryNamePattern *string `json:"registry_name_pattern"` RegistryUnauthenticatedPull *bool `json:"registry_unauthenticated_pull"` ID *int `json:"id"` Name *string `json:"name"` Label *string `json:"label"` Description *string `json:"description"` OrganizationID *int `json:"organization_id"` Organization *shortOrg `json:"organization"` CreatedAt *string `json:"created_at"` UpdatedAt *string `json:"updated_at"` Prior *genericShortRef `json:"prior"` Successor *genericShortRef `json:"successor"` Counts *lifecycleEnvironmentCounts `json:"counts"` Permissions *lePermissions `json:"permissions"` }
LifecycleEnvironment defines model for a Lifecycle Environment.
type LifecycleEnvironments ¶
type LifecycleEnvironments interface { List(ctx context.Context, opt *LifecycleEnvironmentsListOptions) (*LifecycleEnvironmentsList, *http.Response, error) ListByOrganizationID(ctx context.Context, orgID int, opt *LifecycleEnvironmentsListOptions) (*LifecycleEnvironmentsList, *http.Response, error) }
LifecycleEnvironments is an interface for interacting with Red Hat Satellite Lifecycle Environments
type LifecycleEnvironmentsList ¶
type LifecycleEnvironmentsList struct { Results *[]LifecycleEnvironment `json:"results"` // contains filtered or unexported fields }
LifecycleEnvironmentsList defines model for a list of Lifecycle Environments.
type LifecycleEnvironmentsListOptions ¶
type LifecycleEnvironmentsListOptions struct { KatelloListOptions // organization identifier OrganizationID int `url:"organization_id,omitempty"` // set true if you want to see only library environments Library bool `url:"library,omitempty"` // filter only environments containing this name Name string `url:"name,omitempty"` }
LifecycleEnvironmentsListOptions specifies the optional parameters to various List methods that support pagination.
type LifecycleEnvironmentsOp ¶
type LifecycleEnvironmentsOp struct {
// contains filtered or unexported fields
}
LifecycleEnvironmentsOp handles communication with the Lifecycle Environments related methods of the Red Hat Satellite REST API
func (*LifecycleEnvironmentsOp) List ¶
func (s *LifecycleEnvironmentsOp) List(ctx context.Context, opt *LifecycleEnvironmentsListOptions) (*LifecycleEnvironmentsList, *http.Response, error)
List all Lifecycle Environments or a filtered list of Lifecycle Environments
func (*LifecycleEnvironmentsOp) ListByOrganizationID ¶
func (s *LifecycleEnvironmentsOp) ListByOrganizationID(ctx context.Context, orgID int, opt *LifecycleEnvironmentsListOptions) (*LifecycleEnvironmentsList, *http.Response, error)
ListByOrganizationID all Lifecycle Environments in an organization or a filtered list of Lifecycle Environments in an organization
type ListOptions ¶
type ListOptions struct { // Sort field and order, eg. ‘id DESC’ Order string `url:"order,omitempty"` // For paginated result sets, page of results to retrieve. Page int `url:"page,omitempty"` // For paginated result sets, the number of results to include per page. PerPage int `url:"per_page,omitempty"` // A search string used to filter results Search string `url:"search,omitempty"` }
ListOptions specifies the optional parameters to various List methods that support pagination.
type Location ¶
type Location struct { Ancestry *string `json:"ancestry"` ComputeResources *[]genericCompRes `json:"compute_resources"` ConfigTemplates *[]genericTemplate `json:"config_templates"` CreatedAt *string `json:"created_at"` Description *string `json:"description"` Domains *[]genericShortRef `json:"domains"` Environments *[]genericShortRef `json:"environments"` HostGroups *[]genericReference `json:"hostgroups"` HostsCount *int `json:"hosts_count"` ID *int `json:"id"` Media *[]genericShortRef `json:"media"` Name *string `json:"name"` Organizations *[]genericReference `json:"organizations"` Parameters *[]orgParameter `json:"parameters"` ParentID *int `json:"parent_id"` ParentName *string `json:"parent_name"` ProvisioningTemplates *[]genericTemplate `json:"provisioning_templates"` Ptables *[]genericPtables `json:"ptables"` //Realms *[]genericReference `json:"realms"` SelectAllTypes *[]string `json:"select_all_types"` SmartProxies *[]genericSmartProxy `json:"smart_proxies"` Subnets *[]genericSubnet `json:"subnets,omitempty"` Title *string `json:"title"` UpdatedAt *string `json:"updated_at"` Users *[]genericUser `json:"users"` }
Location defines model for a Location.
type LocationCreate ¶
type LocationCreate struct { Location struct { Name *string `json:"name"` Description *string `json:"description,omitempty"` UserIDs *[]int `json:"user_ids,omitempty"` SmartProxyIDs *[]int `json:"smart_proxy_ids,omitempty"` ComputeResourceIDs *[]int `json:"compute_resource_ids,omitempty"` MediumIDs *[]int `json:"medium_ids,omitempty"` ConfigTemplateIDs *[]int `json:"config_template_ids,omitempty"` PtableIDs *[]int `json:"ptable_ids,omitempty"` ProvisioningTemplateIDs *[]int `json:"provisioning_template_ids,omitempty"` DomainIDs *[]int `json:"domain_ids,omitempty"` RealmIDs *[]int `json:"realm_ids,omitempty"` HostgroupIDs *[]int `json:"hostgroup_ids,omitempty"` EnvironmentIDs *[]int `json:"environment_ids,omitempty"` SubnetIDs *[]int `json:"subnet_ids,omitempty"` ParentID *int `json:"parent_id,omitempty"` IgnoreTypes *[]int `json:"ignore_types,omitempty"` } `json:"location,omitempty"` }
LocationCreate defines model for creating a location.
type LocationUpdate ¶
type LocationUpdate struct { Location struct { Name *string `json:"name,omitempty"` Description *string `json:"description,omitempty"` UserIDs *[]int `json:"user_ids,omitempty"` SmartProxyIDs *[]int `json:"smart_proxy_ids,omitempty"` ComputeResourceIDs *[]int `json:"compute_resource_ids,omitempty"` MediumIDs *[]int `json:"medium_ids,omitempty"` ConfigTemplateIDs *[]int `json:"config_template_ids,omitempty"` PtableIDs *[]int `json:"ptable_ids,omitempty"` ProvisioningTemplateIDs *[]int `json:"provisioning_template_ids,omitempty"` DomainIDs *[]int `json:"domain_ids,omitempty"` RealmIDs *[]int `json:"realm_ids,omitempty"` HostgroupIDs *[]int `json:"hostgroup_ids,omitempty"` EnvironmentIDs *[]int `json:"environment_ids,omitempty"` SubnetIDs *[]int `json:"subnet_ids,omitempty"` ParentID *int `json:"parent_id,omitempty"` IgnoreTypes *[]int `json:"ignore_types,omitempty"` } `json:"location,omitempty"` }
LocationUpdate defines model for updating a location.
type Locations ¶
type Locations interface { Create(ctx context.Context, locCreate LocationCreate) (*Location, *http.Response, error) Delete(ctx context.Context, locationID int) (*http.Response, error) Get(ctx context.Context, locationID int) (*Location, *http.Response, error) List(ctx context.Context, opt *LocationsListOptions) (*LocationsList, *http.Response, error) Update(ctx context.Context, locationID int, update LocationUpdate) (*Location, *http.Response, error) }
Locations is an interface for interacting with Red Hat Satellite Locations
type LocationsList ¶
type LocationsList struct { Results *[]Location `json:"results"` // contains filtered or unexported fields }
LocationsList defines model for a list of locations.
type LocationsListOptions ¶
type LocationsListOptions struct { ListOptions // Scope by locations LocationID int `url:"location_id,omitempty"` // Scope by organizations OrganizationID int `url:"organization_id,omitempty"` }
LocationsListOptions specifies the optional parameters to various List methods that support pagination.
type LocationsOp ¶
type LocationsOp struct {
// contains filtered or unexported fields
}
LocationsOp handles communication with the Locations related methods of the Red Hat Satellite REST API
func (*LocationsOp) Create ¶
func (s *LocationsOp) Create(ctx context.Context, locCreate LocationCreate) (*Location, *http.Response, error)
Create a new location
func (*LocationsOp) List ¶
func (s *LocationsOp) List(ctx context.Context, opt *LocationsListOptions) (*LocationsList, *http.Response, error)
List all locations or a filtered list of locations
type ManifestHistoryItem ¶
type ManifestHistoryItem struct { Created *string `json:"created"` ID *string `json:"id"` Status *string `json:"status"` StatusMessage *string `json:"statusMessage"` }
ManifestHistoryItem defines model for a single manifest history
type ManifestUpload ¶
type ManifestUpload struct { ID *string `json:"id"` Label *string `json:"label"` Pending *bool `json:"pending"` Action *string `json:"action"` UserName *string `json:"username"` StartedAt *string `json:"started_at"` EndedAt *string `json:"ended_at"` State *string `json:"state"` Result *string `json:"result"` }
ManifestUpload defines model for the response from a manifest upload to an organization
type Manifests ¶
type Manifests interface { Delete(ctx context.Context, orgID int) (*http.Response, error) GetHistory(ctx context.Context, orgID int) (*[]ManifestHistoryItem, *http.Response, error) Refresh(ctx context.Context, orgID int) (*http.Response, error) Upload(ctx context.Context, orgID int, repoURL *string, manifest []byte, manifestFilename string) (*ManifestUpload, *http.Response, error) }
Manifests is an interface for interacting with Red Hat Satellite Subscription Manifests
type ManifestsOp ¶
type ManifestsOp struct {
// contains filtered or unexported fields
}
ManifestsOp handles communication with the Manifest related methods of the Red Hat Satellite REST API
func (*ManifestsOp) GetHistory ¶
func (s *ManifestsOp) GetHistory(ctx context.Context, orgID int) (*[]ManifestHistoryItem, *http.Response, error)
GetHistory of a manifest for an organization based on its ID
type Organization ¶
type Organization struct { Ancestry *string `json:"ancestry"` ComputeResources *[]genericCompRes `json:"compute_resources"` ConfigTemplates *[]genericTemplate `json:"config_templates"` CreatedAt *string `json:"created_at"` DefaultContentViewID *int `json:"default_content_view_id"` Description *string `json:"description"` Domains *[]genericShortRef `json:"domains"` Environments *[]genericShortRef `json:"environments"` HostGroups *[]genericReference `json:"hostgroups"` HostsCount *int `json:"hosts_count"` ID *int `json:"id"` Label *string `json:"label"` LibraryID *int `json:"library_id"` Locations *[]genericReference `json:"locations"` Media *[]genericShortRef `json:"media"` Name *string `json:"name"` OwnerDetails *orgOwnerDetails `json:"owner_details"` Parameters *[]orgParameter `json:"parameters"` ParentID *int `json:"parent_id"` ParentName *string `json:"parent_name"` ProvisioningTemplates *[]genericTemplate `json:"provisioning_templates"` Ptables *[]genericPtables `json:"ptables"` //Realms *[]genericReference `json:"realms"` RedHatRepositoryURL *string `json:"redhat_repository_url"` SelectAllTypes *[]string `json:"select_all_types"` ServiceLevel *string `json:"service_level"` ServiceLevels *[]string `json:"service_levels"` SmartProxies *[]genericSmartProxy `json:"smart_proxies"` Subnets *[]genericSubnet `json:"subnets,omitempty"` //SystemPurposes Title *string `json:"title"` UpdatedAt *string `json:"updated_at"` Users *[]genericUser `json:"users"` }
Organization defines model for an Organization.
type OrganizationCreate ¶
type OrganizationCreate struct { Organization struct { ComputeResourceIDs *[]int `json:"compute_resource_ids,omitempty"` ConfigTemplateIDs *[]int `json:"config_template_ids,omitempty"` Description *string `json:"description,omitempty"` DomainIDs *[]int `json:"domain_ids,omitempty"` EnvironmentIDs *[]int `json:"environment_ids,omitempty"` HostgroupIDs *[]int `json:"hostgroup_ids,omitempty"` Label *string `json:"label,omitempty"` MediumIDs *[]int `json:"medium_ids,omitempty"` Name string `json:"name"` ProvisioningTemplateIDs *[]int `json:"provisioning_template_ids,omitempty"` PtableIDs *[]int `json:"ptable_ids,omitempty"` RealmIds *[]int `json:"realm_ids,omitempty"` SmartProxyIDs *[]int `json:"smart_proxy_ids,omitempty"` SubnetIDs *[]int `json:"subnet_ids,omitempty"` UserIDs *[]int `json:"user_ids,omitempty"` } `json:"organization"` }
OrganizationCreate defines model for OrganizationCreate.
type OrganizationShort ¶
type OrganizationShort struct { CreatedAt *string `json:"created_at"` Description *string `json:"description"` ID *int `json:"id"` Label *string `json:"label"` Name *string `json:"name"` Title *string `json:"title"` UpdatedAt *string `json:"updated_at"` }
OrganizationShort defines model for an Organization.
type OrganizationUpdate ¶
type OrganizationUpdate struct { Organization struct { ComputeResourceIDs *[]int `json:"compute_resource_ids,omitempty"` ConfigTemplateIDs *[]int `json:"config_template_ids,omitempty"` Description *string `json:"description,omitempty"` DomainIDs *[]int `json:"domain_ids,omitempty"` EnvironmentIDs *[]int `json:"environment_ids,omitempty"` HostgroupIDs *[]int `json:"hostgroup_ids,omitempty"` IgnoreTypes *[]string `json:"ignore_types,omitempty"` MediumIds *[]int `json:"medium_ids,omitempty"` Name *string `json:"name,omitempty"` ParentID *int `json:"parent_id,omitempty"` ProvisioningTemplateIDs *[]int `json:"provisioning_template_ids,omitempty"` PtableIDs *[]int `json:"ptable_ids,omitempty"` RealmIDs *[]int `json:"realm_ids,omitempty"` SmartProxyIDs *[]int `json:"smart_proxy_ids,omitempty"` SubnetIDs *[]int `json:"subnet_ids,omitempty"` UserIDs *[]int `json:"user_ids,omitempty"` } `json:"organization"` RedhatRepositoryURL *string `json:"redhat_repository_url,omitempty"` }
OrganizationUpdate defines model for OrganizationUpdate.
type Organizations ¶
type Organizations interface { Create(ctx context.Context, orgCreate OrganizationCreate) (*Organization, *http.Response, error) Delete(ctx context.Context, orgID int) (*http.Response, error) Get(ctx context.Context, orgID int) (*Organization, *http.Response, error) List(ctx context.Context, opt *OrganizationsListOptions) (*OrganizationsList, *http.Response, error) Update(ctx context.Context, orgID int, update OrganizationUpdate) (*Organization, *http.Response, error) }
Organizations is an interface for interacting with Red Hat Satellite organizations
type OrganizationsList ¶
type OrganizationsList struct { Error *string `json:"error"` Results *[]OrganizationShort `json:"results"` // contains filtered or unexported fields }
OrganizationsList defines model for a list of organizations.
type OrganizationsListOptions ¶
type OrganizationsListOptions struct { KatelloListOptions // Set the current location context for the request LocationID int `url:"location_id,omitempty"` // Set the current organization context for the request OrganizationID int `url:"organization_id,omitempty"` }
OrganizationsListOptions specifies the optional parameters to various List methods that support pagination.
type OrganizationsOp ¶
type OrganizationsOp struct {
// contains filtered or unexported fields
}
OrganizationsOp handles communication with the Organization related methods of the Red Hat Satellite REST API
func (*OrganizationsOp) Create ¶
func (s *OrganizationsOp) Create(ctx context.Context, orgCreate OrganizationCreate) (*Organization, *http.Response, error)
Create a new organization
func (*OrganizationsOp) Get ¶
func (s *OrganizationsOp) Get(ctx context.Context, orgID int) (*Organization, *http.Response, error)
Get a single Organization by its ID
func (*OrganizationsOp) List ¶
func (s *OrganizationsOp) List(ctx context.Context, opt *OrganizationsListOptions) (*OrganizationsList, *http.Response, error)
List all organizations or a filtered list of organizations
func (*OrganizationsOp) Update ¶
func (s *OrganizationsOp) Update(ctx context.Context, orgID int, update OrganizationUpdate) (*Organization, *http.Response, error)
Update the settings of an organization by its ID
type Permission ¶
type Permission struct { ID *int `json:"id"` Name *string `json:"name"` ResourceType *string `json:"resource_type"` }
Permission defines the model of a single permission
type Permissions ¶
type Permissions interface { Get(ctx context.Context, permissionID int) (*Permission, *http.Response, error) List(ctx context.Context, opt PermissionsListOptions) (*PermissionsList, *http.Response, error) }
Permissions is an interface for interacting with Red Hat Satellite permissions
type PermissionsList ¶
type PermissionsList struct { Results *[]Permission `json:"results"` // contains filtered or unexported fields }
PermissionsList defines model for a list of permissions.
type PermissionsListOptions ¶
type PermissionsListOptions struct { ListOptions // Scope by locations LocationID int `url:"location_id,omitempty"` // Scope by organizations OrganizationID int `url:"organization_id,omitempty"` }
PermissionsListOptions specifies the optional parameters to various List methods that support pagination.
type PermissionsOp ¶
type PermissionsOp struct {
// contains filtered or unexported fields
}
PermissionsOp handles communication with the Permissions related methods of the Red Hat Satellite REST API
func (*PermissionsOp) Get ¶
func (s *PermissionsOp) Get(ctx context.Context, permissionID int) (*Permission, *http.Response, error)
Get a single permission by its ID
func (*PermissionsOp) List ¶
func (s *PermissionsOp) List(ctx context.Context, opt PermissionsListOptions) (*PermissionsList, *http.Response, error)
List all permissions or a filtered list of permissions
type Product ¶
type Product struct { CpID *string `json:"cp_id"` Description *string `json:"description"` GPGKeyID *int `json:"gpg_key_id"` ID *int `json:"id"` Label *string `json:"label"` LastSync *string `json:"last_sync"` LastSyncWords *string `json:"last_sync_words"` Name *string `json:"name"` Organization *shortOrg `json:"organization"` OrganizationID *int `json:"organization_id"` ProviderID *int `json:"provider_id"` RepositoryCount *int `json:"repository_count"` SSLCACertID *int `json:"ssl_ca_cert_id"` SSLClientCertID *int `json:"ssl_client_cert_id"` SSLClientKeyID *int `json:"ssl_client_key_id"` SyncPlan *productSyncPlan `json:"sync_plan"` SyncPlanID *int `json:"sync_plan_id"` SyncState *string `json:"sync_state"` SyncSummary *productSyncSummary `json:"sync_summary"` }
Product defines the model of a single product
type Products ¶
type Products interface { ListByOrgID(ctx context.Context, orgID int, opt *ProductsListOptions) (*ProductsList, *http.Response, error) List(ctx context.Context, opt *ProductsListOptions) (*ProductsList, *http.Response, error) }
Products is an interface for interacting with Red Hat Satellite products
type ProductsList ¶
type ProductsList struct { Error *string `json:"error"` Results *[]Product `json:"results"` // contains filtered or unexported fields }
ProductsList defines model for a list of products.
type ProductsListOptions ¶
type ProductsListOptions struct { KatelloListOptions // Filter products by organization OrganizationID int `url:"organization_id,omitempty"` // Filter products by subscription SubscriptionID int `url:"subscription_id,omitempty"` // Filter products by name Name string `url:"name,omitempty"` // Return enabled products only Enabled bool `url:"enabled,omitempty"` // Return custom products only Custom bool `url:"custom,omitempty"` // Return Red Hat (non-custom) products only RedHatOnly bool `url:"redhat_only,omitempty"` // Whether to include available content attribute in results IncludeAvailableContent bool `url:"include_available_content,omitempty"` // Filter products by sync plan id SyncPlanID int `url:"sync_plan_id,omitempty"` // Interpret specified object to return only Products that can be associated with specified object. Only 'sync_plan' is supported. AvailableFor string `url:"available_for,omitempty"` }
ProductsListOptions specifies the optional parameters to various List methods that support pagination.
type ProductsOp ¶
type ProductsOp struct {
// contains filtered or unexported fields
}
ProductsOp handles communication with the Product related methods of the Red Hat Satellite REST API
func (*ProductsOp) List ¶
func (s *ProductsOp) List(ctx context.Context, opt *ProductsListOptions) (*ProductsList, *http.Response, error)
List all products or a filtered list of products
func (*ProductsOp) ListByOrgID ¶
func (s *ProductsOp) ListByOrgID(ctx context.Context, orgID int, opt *ProductsListOptions) (*ProductsList, *http.Response, error)
ListByOrgID all products or a filtered list of products for a specific organization
type Repositories ¶
type Repositories interface { Get(ctx context.Context, repoID int) (*Repository, *http.Response, error) List(ctx context.Context, opt *RepositoriesListOptions) (*RepositoriesList, *http.Response, error) }
Repositories is an interface for interacting with Red Hat Satellite repositories
type RepositoriesList ¶
type RepositoriesList struct { Error *string `json:"error"` Results *[]Repository `json:"results"` // contains filtered or unexported fields }
RepositoriesList defines model for a list of repositories.
type RepositoriesListOptions ¶
type RepositoriesListOptions struct { KatelloListOptions // ID of an organization to show repositories in OrganizationID int `url:"organization_id,omitempty"` // ID of a product to show repositories of ProductID int `url:"product_id,omitempty"` // ID of an environment to show repositories in EnvironmentID int `url:"environment_id,omitempty"` // ID of a content view to show repositories in ContentViewID int `url:"content_view_id,omitempty"` // ID of a content view version to show repositories in ContentViewVersionID int `url:"content_view_version_id,omitempty"` // Id of a deb package to find repositories that contain the deb DebID int `url:"deb_id,omitempty"` // Id of an erratum to find repositories that contain the erratum ErratumID int `url:"erratum_id,omitempty"` // Id of a rpm package to find repositories that contain the rpm RpmID int `url:"rpm_id,omitempty"` // Id of a file to find repositories that contain the file FileID int `url:"file_id,omitempty"` // Id of an ansible collection to find repositories that contain the ansible collection AnsibleCollectionID int `url:"ansible_collection_id,omitempty"` // Id of an ostree branch to find repositories that contain that branch OSTreeBranchID int `url:"ostree_branch_id,omitempty"` // show repositories in Library and the default content view Library bool `url:"library,omitempty"` // show archived repositories Archived bool `url:"archived,omitempty"` // limit to only repositories of this type // Must be one of: puppet, deb, ansible_collection, ostree, docker, yum, file. ContentType string `url:"content_type,omitempty"` // name of the repository Name string `url:"name,omitempty"` // label of the repository Label string `url:"label,omitempty"` // description of the repository Description string `url:"description,omitempty"` // interpret specified object to return only Repositories that can be associated with specified object. // Only 'content_view' & 'content_view_version' are supported. AvailableFor string `url:"available_for,omitempty"` // only repositories having at least one of the specified content type ex: rpm , erratum // Must be one of: puppet_module, deb, ansible collection, ostree, docker_manifest, docker_manifest_list, docker_tag, docker_blob, rpm, modulemd, erratum, distribution, package_category, package_group, yum_repo_metadata_file, srpm, file. WithContent string `url:"with_content,omitempty"` }
RepositoriesListOptions specifies the optional parameters to various List methods that support pagination.
type RepositoriesOp ¶
type RepositoriesOp struct {
// contains filtered or unexported fields
}
RepositoriesOp handles communication with the Repository related methods of the Red Hat Satellite REST API
func (*RepositoriesOp) Get ¶
func (s *RepositoriesOp) Get(ctx context.Context, repoID int) (*Repository, *http.Response, error)
Get a single repository by its ID
func (*RepositoriesOp) List ¶
func (s *RepositoriesOp) List(ctx context.Context, opt *RepositoriesListOptions) (*RepositoriesList, *http.Response, error)
List all repositories or a filtered list of repositories
type Repository ¶
type Repository struct { Arch *string `json:"arch"` BackendIdentifier *string `json:"backend_identifier"` ChecksumType *string `json:"checksum_type"` ComputedOSTreeUpstreamSyncDepth *int `json:"computed_ostree_upstream_sync_depth"` ContainerRepositoryName *string `json:"container_repository_name"` ContentCounts *repoContentCounts `json:"content_counts"` ContentID *string `json:"content_id"` ContentLabel *string `json:"content_label"` ContentType *string `json:"content_type"` ContentView *repoContentView `json:"content_view"` ContentViewVersionID *string `json:"content_view_version_id"` CreatedAt *string `json:"created_at"` //"deb_architectures": null, //"deb_components": null, //"deb_releases": null, Description *string `json:"description"` // "docker_tags_whitelist": null, // "docker_upstream_name": null, DownloadPolicy *string `json:"download_policy"` Environment *repoEnvironment `json:"environment"` FullPath *string `json:"full_path"` //"gpg_key": null, //"gpg_key_id": null, ID *int `json:"id"` //"ignorable_content": null, IgnoreGlobalProxy *bool `json:"ignore_global_proxy"` Label *string `json:"label"` LastSync *repoLastSync `json:"last_sync"` LastSyncWords *string `json:"last_sync_words"` //"library_instance_id": null, Major *int `json:"major"` Minor *string `json:"minor"` MirrorOnSync *bool `json:"mirror_on_sync"` Name *int `json:"name"` Organization *shortOrg `json:"organization"` //"ostree_branches": [], //"ostree_upstream_sync_depth": null, //"ostree_upstream_sync_policy": null, Permissions *repoPermissions `json:"permissions"` Product *repoProduct `json:"product"` Promoted *bool `json:"promoted"` RelativePath *string `json:"relative_path"` // "ssl_ca_cert": { // "id": null, // "name": null // }, // "ssl_ca_cert_id": null, // "ssl_client_cert": { // "id": null, // "name": null // }, // "ssl_client_cert_id": null, // "ssl_client_key": { // "id": null, // "name": null // }, // "ssl_client_key_id": null, Unprotected *bool `json:"unprotected"` UpdatedAt *string `json:"updated_at"` UpstreamAuthExists *bool `json:"upstream_auth_exists"` UpstreamPasswordExists *bool `json:"upstream_password_exists"` //"upstream_username": null, URL *string `json:"url"` VerifySSLOnSync *bool `json:"verify_ssl_on_sync"` }
Repository defines the model of a single repository
type RequestCompletionCallback ¶
RequestCompletionCallback defines the type of the request callback function
type ResourceTypes ¶
type ResourceTypes struct { Results *[]struct { Name *string `json:"name"` } `json:"results"` // contains filtered or unexported fields }
ResourceTypes defines model for a list of resource types.
type Role ¶
type Role struct { Builtin *int `json:"builtin"` ClonedFromID *int `json:"cloned_from_id"` Description *string `json:"description"` Filters *[]genericIDReference `json:"filters"` ID *int `json:"id"` Locations *[]genericReference `json:"locations"` Name *string `json:"name"` Organizations *[]genericReference `json:"organizations"` Origin *string `json:"origin"` }
Role defines model for a Role.
type RoleCreate ¶
type RoleCreate struct { Role struct { Name *string `json:"name"` Description *string `json:"description,omitempty"` LocationIDs *[]int `json:"location_ids,omitempty"` OrganizationIDs *[]int `json:"organization_ids,omitempty"` } `json:"role"` }
RoleCreate defines model for the body of the creation of a role.
type RoleUpdate ¶
type RoleUpdate struct { Role struct { Name *string `json:"name,omitempty"` Description *string `json:"description,omitempty"` LocationIDs *[]int `json:"location_ids,omitempty"` OrganizationIDs *[]int `json:"organization_ids,omitempty"` } `json:"role"` }
RoleUpdate defines model for the body of the update of a role.
type Roles ¶
type Roles interface { Create(ctx context.Context, roleCreate RoleCreate) (*Role, *http.Response, error) Delete(ctx context.Context, roleID int) (*http.Response, error) Get(ctx context.Context, roleID int) (*Role, *http.Response, error) Update(ctx context.Context, roleID int, roleUpdate RoleUpdate) (*Role, *http.Response, error) }
Roles is an interface for interacting with Red Hat Satellite roles
type RolesOp ¶
type RolesOp struct {
// contains filtered or unexported fields
}
RolesOp handles communication with the Role related methods of the Red Hat Satellite REST API
type UserGroup ¶
type UserGroup struct { Admin *bool `json:"admin"` CreatedAt *string `json:"created_at"` UpdatedAt *string `json:"updated_at"` Name *string `json:"name"` ID *int `json:"id"` ExternalUserGroups *[]genericShortRef `json:"external_usergroups"` UserGroups *[]genericUserGroup `json:"usergroups"` Users *[]genericUser `json:"users"` Roles *[]genericRole `json:"roles"` }
UserGroup defines model for a User Group.
type UserGroupCreate ¶
type UserGroupCreate struct { UserGroup struct { Name *string `json:"name"` Admin *bool `json:"admin,omitempty"` UserIDs *[]int `json:"user_ids,omitempty"` UserGroupIDs *[]int `json:"usergroup_ids,omitempty"` RoleIDs *[]int `json:"role_ids,omitempty"` } `json:"usergroup"` }
UserGroupCreate defines model for the body of the creation of a user group.
type UserGroupUpdate ¶
type UserGroupUpdate struct { UserGroup struct { Name *string `json:"name,omitempty"` Admin *bool `json:"admin,omitempty"` UserIDs *[]int `json:"user_ids,omitempty"` UserGroupIDs *[]int `json:"usergroup_ids,omitempty"` RoleIDs *[]int `json:"role_ids,omitempty"` } `json:"usergroup"` }
UserGroupUpdate defines model for the body of the update of a user group.
type UserGroups ¶
type UserGroups interface { Create(ctx context.Context, userGroupCreate UserGroupCreate) (*UserGroup, *http.Response, error) Delete(ctx context.Context, userGroupID int) (*UserGroup, *http.Response, error) Get(ctx context.Context, userGroupID int) (*UserGroup, *http.Response, error) Update(ctx context.Context, userGroupID int, userGroupUpdate UserGroupUpdate) (*UserGroup, *http.Response, error) }
UserGroups is an interface for interacting with Red Hat Satellite roles
type UserGroupsOp ¶
type UserGroupsOp struct {
// contains filtered or unexported fields
}
UserGroupsOp handles communication with the User Group related methods of the Red Hat Satellite REST API
func (*UserGroupsOp) Create ¶
func (s *UserGroupsOp) Create(ctx context.Context, userGroupCreate UserGroupCreate) (*UserGroup, *http.Response, error)
Create a user group
func (*UserGroupsOp) Delete ¶
func (s *UserGroupsOp) Delete(ctx context.Context, userGroupID int) (*UserGroup, *http.Response, error)
Delete a user group by its ID