public

package
v0.0.0-...-1a88b7f Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package public provides primitives to interact with the openapi HTTP API.

Code generated by github.com/deepmap/oapi-codegen version v1.16.3 DO NOT EDIT.

Package public provides primitives to interact with the openapi HTTP API.

Code generated by github.com/deepmap/oapi-codegen version v1.16.3 DO NOT EDIT.

Package public provides primitives to interact with the openapi HTTP API.

Code generated by github.com/deepmap/oapi-codegen version v1.16.3 DO NOT EDIT.

Index

Constants

View Source
const (
	X_rh_identityScopes               = "x_rh_identity.Scopes"
	X_rh_idm_registration_tokenScopes = "x_rh_idm_registration_token.Scopes"
)

Variables

This section is empty.

Functions

func GetSwagger

func GetSwagger() (swagger *openapi3.T, err error)

GetSwagger returns the Swagger specification corresponding to the generated code in this file. The external references of Swagger specification are resolved. The logic of resolving external references is tightly connected to "import-mapping" feature. Externally referenced files must be embedded in the corresponding golang packages. Urls can be supported but this task was out of the scope.

func PathToRawSpec

func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)

Constructs a synthetic filesystem for resolving external references when loading openapi specifications.

func RegisterHandlers

func RegisterHandlers(router EchoRouter, si ServerInterface)

RegisterHandlers adds each server route to the EchoRouter.

func RegisterHandlersWithBaseURL

func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL string)

Registers handlers, and prepends BaseURL to the paths, so that the paths can be served under a prefix.

Types

type CaCertBundle

type CaCertBundle = string

CaCertBundle A string of concatenated, PEM-encoded X.509 certificates

type Certificate

type Certificate struct {
	Issuer       string    `json:"issuer"`
	Nickname     string    `json:"nickname"`
	NotAfter     time.Time `json:"not_after"`
	NotBefore    time.Time `json:"not_before"`
	Pem          string    `json:"pem"`
	SerialNumber string    `json:"serial_number"`
	Subject      string    `json:"subject"`
}

Certificate defines model for Certificate.

type CreateDomainTokenJSONRequestBody

type CreateDomainTokenJSONRequestBody = DomainRegTokenRequest

CreateDomainTokenJSONRequestBody defines body for CreateDomainToken for application/json ContentType.

type CreateDomainTokenParams

type CreateDomainTokenParams struct {
	// XRhInsightsRequestId Request id for distributed tracing.
	XRhInsightsRequestId *XRhInsightsRequestIdHeader `json:"X-Rh-Insights-Request-Id,omitempty"`
}

CreateDomainTokenParams defines parameters for CreateDomainToken.

type DeleteDomainParams

type DeleteDomainParams struct {
	// XRhInsightsRequestId Request id for distributed tracing.
	XRhInsightsRequestId *XRhInsightsRequestIdHeader `json:"X-Rh-Insights-Request-Id,omitempty"`
}

DeleteDomainParams defines parameters for DeleteDomain.

type Domain

type Domain struct {
	// AutoEnrollmentEnabled Enable or disable host vm auto-enrollment for this domain
	AutoEnrollmentEnabled *bool `json:"auto_enrollment_enabled,omitempty"`

	// Description Human readable description abou the domain.
	Description *string `json:"description,omitempty"`

	// DomainId A domain id
	DomainId *DomainId `json:"domain_id,omitempty"`

	// DomainName A name of a domain (all lower-case). The domain name can only be set during initial registration and not be modified by updates.
	DomainName DomainName `json:"domain_name"`

	// DomainType Type of domain (currently only rhel-idm)
	DomainType DomainType `json:"domain_type"`

	// RhelIdm Options for ipa domains
	RhelIdm *DomainIpa `json:"rhel-idm,omitempty"`

	// Title Title to describe the domain.
	Title *string `json:"title,omitempty"`
}

Domain A domain resource

type DomainId

type DomainId = openapi_types.UUID

DomainId A domain id

type DomainIdParam

type DomainIdParam = DomainId

DomainIdParam A domain id

type DomainIpa

type DomainIpa struct {
	// AutomountLocations List of automount locations for AutoFS
	AutomountLocations *[]string `json:"automount_locations,omitempty"`

	// CaCerts A base64 representation of all the list of chain of certificates, including the server ca.
	CaCerts []Certificate `json:"ca_certs"`

	// Locations List of DNS locations
	Locations []Location `json:"locations"`

	// RealmDomains List of realm associated to the IPA domain.
	RealmDomains []DomainName `json:"realm_domains"`

	// RealmName A Kerberos realm name (usually all upper-case domain name). The realm can only be set during initial registration and not be modified by updates.
	RealmName RealmName `json:"realm_name"`

	// Servers List of auto-enrollment enabled servers for this domain.
	Servers []DomainIpaServer `json:"servers"`
}

DomainIpa Options for ipa domains

type DomainIpaServer

type DomainIpaServer struct {
	CaServer bool `json:"ca_server"`

	// Fqdn A host's Fully Qualified Domain Name (all lower-case).
	Fqdn                Fqdn `json:"fqdn"`
	HccEnrollmentServer bool `json:"hcc_enrollment_server"`
	HccUpdateServer     bool `json:"hcc_update_server"`

	// Location A location identifier (lower-case DNS label)
	Location     *LocationName `json:"location,omitempty"`
	PkinitServer bool          `json:"pkinit_server"`

	// SubscriptionManagerId A Red Hat Subcription Manager ID of a RHEL host.
	SubscriptionManagerId *SubscriptionManagerId `json:"subscription_manager_id,omitempty"`
}

DomainIpaServer Server schema for an entry into the Ipa domain type.

type DomainName

type DomainName = string

DomainName A name of a domain (all lower-case). The domain name can only be set during initial registration and not be modified by updates.

type DomainRegToken

type DomainRegToken struct {
	// DomainId A domain id
	DomainId DomainId `json:"domain_id"`

	// DomainToken A domain registration token string
	DomainToken string `json:"domain_token"`

	// DomainType Type of domain (currently only rhel-idm)
	DomainType DomainType `json:"domain_type"`

	// Expiration Expiration time stamp (Unix timestamp)
	Expiration int `json:"expiration"`
}

DomainRegToken A domain registration response

type DomainRegTokenRequest

type DomainRegTokenRequest struct {
	// DomainType Type of domain (currently only rhel-idm)
	DomainType DomainType `json:"domain_type"`
}

DomainRegTokenRequest A domain registration request

type DomainRegTokenResponse

type DomainRegTokenResponse = DomainRegToken

DomainRegTokenResponse A domain registration response

type DomainRegisterResponse

type DomainRegisterResponse = Domain

DomainRegisterResponse A domain resource

type DomainResponse

type DomainResponse = Domain

DomainResponse A domain resource

type DomainType

type DomainType string

DomainType Type of domain (currently only rhel-idm)

const (
	RhelIdm DomainType = "rhel-idm"
)

Defines values for DomainType.

type DomainUpdateResponse

type DomainUpdateResponse = Domain

DomainUpdateResponse A domain resource

type EchoRouter

type EchoRouter interface {
	CONNECT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	DELETE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	GET(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	HEAD(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	OPTIONS(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	PATCH(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	POST(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	PUT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	TRACE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
}

This is a simple interface which specifies echo.Route addition functions which are present on both echo.Echo and echo.Group, since we want to allow using either of them for path registration

type ErrorInfo

type ErrorInfo struct {
	// Code an application-specific error code
	Code *string `json:"code,omitempty"`

	// Detail A detailed explanation of the error, e.g. traceback.
	Detail *string `json:"detail,omitempty"`

	// Id a unique identifier for this particular occurrence of the problem.
	Id string `json:"id"`

	// Status The HTTP status code for the error.
	Status string `json:"status"`

	// Title The human-readable HTTP status text for the error.
	Title string `json:"title"`
}

ErrorInfo defines model for ErrorInfo.

type ErrorResponse

type ErrorResponse = Errors

ErrorResponse General error response returned by the idmsvc API

type Errors

type Errors struct {
	// Errors Error objects provide additional information about problems encountered while performing an operation.
	Errors *[]ErrorInfo `json:"errors,omitempty"`
}

Errors General error response returned by the idmsvc API

type Fqdn

type Fqdn = string

Fqdn A host's Fully Qualified Domain Name (all lower-case).

type GetSigningKeysParams

type GetSigningKeysParams struct {
	// XRhInsightsRequestId Request id for distributed tracing.
	XRhInsightsRequestId *XRhInsightsRequestIdHeader `json:"X-Rh-Insights-Request-Id,omitempty"`
}

GetSigningKeysParams defines parameters for GetSigningKeys.

type HostConf

type HostConf struct {
	// DomainId A domain id
	DomainId *DomainId `json:"domain_id,omitempty"`

	// DomainName A name of a domain (all lower-case). The domain name can only be set during initial registration and not be modified by updates.
	DomainName *DomainName `json:"domain_name,omitempty"`

	// DomainType Type of domain (currently only rhel-idm)
	DomainType *DomainType `json:"domain_type,omitempty"`
}

HostConf Represent the request payload for the /host-conf/:inventory_id/:fqdn endpoint.

type HostConfIpa

type HostConfIpa struct {
	// AutomountLocation Automount location name for ipa-client-automount
	AutomountLocation *string `json:"automount_location,omitempty"`

	// Cabundle A string of concatenated, PEM-encoded X.509 certificates
	Cabundle CaCertBundle `json:"cabundle"`

	// EnrollmentServers List of auto-enrollment enabled servers for this domain.
	EnrollmentServers []HostConfIpaServer `json:"enrollment_servers"`

	// IpaClientInstallArgs List of additional arguments for ipa-client-install
	IpaClientInstallArgs *[]string `json:"ipa_client_install_args,omitempty"`

	// RealmName A Kerberos realm name (usually all upper-case domain name). The realm can only be set during initial registration and not be modified by updates.
	RealmName RealmName `json:"realm_name"`
}

HostConfIpa Options for ipa domains

type HostConfIpaServer

type HostConfIpaServer struct {
	// Fqdn A host's Fully Qualified Domain Name (all lower-case).
	Fqdn Fqdn `json:"fqdn"`

	// Location A location identifier (lower-case DNS label)
	Location *LocationName `json:"location,omitempty"`
}

HostConfIpaServer Auto-enrollment enabled server for this domain.

type HostConfJSONRequestBody

type HostConfJSONRequestBody = HostConf

HostConfJSONRequestBody defines body for HostConf for application/json ContentType.

type HostConfParams

type HostConfParams struct {
	// XRhInsightsRequestId Request id for distributed tracing.
	XRhInsightsRequestId *XRhInsightsRequestIdHeader `json:"X-Rh-Insights-Request-Id,omitempty"`
}

HostConfParams defines parameters for HostConf.

type HostConfResponse

type HostConfResponse = HostConfResponseSchema

HostConfResponse The response for the action to retrieve the host vm information when it is being enrolled. This action is taken from the host vm.

type HostConfResponseSchema

type HostConfResponseSchema struct {
	// AutoEnrollmentEnabled Enable or disable host vm auto-enrollment for this domain
	AutoEnrollmentEnabled bool `json:"auto_enrollment_enabled"`

	// DomainId A domain id
	DomainId DomainId `json:"domain_id"`

	// DomainName A name of a domain (all lower-case). The domain name can only be set during initial registration and not be modified by updates.
	DomainName DomainName `json:"domain_name"`

	// DomainType Type of domain (currently only rhel-idm)
	DomainType DomainType `json:"domain_type"`

	// RhelIdm Options for ipa domains
	RhelIdm HostConfIpa `json:"rhel-idm"`

	// Token A serialized JWS token or JWT to authenticate a host registration request.
	Token *HostToken `json:"token,omitempty"`
}

HostConfResponseSchema The response for the action to retrieve the host vm information when it is being enrolled. This action is taken from the host vm.

type HostId

type HostId = openapi_types.UUID

HostId A Host-Based Inventory ID of a host.

type HostToken

type HostToken = string

HostToken A serialized JWS token or JWT to authenticate a host registration request.

type ListDomainsData

type ListDomainsData struct {
	AutoEnrollmentEnabled bool `json:"auto_enrollment_enabled"`

	// Description Human-readable description of the domain entry.
	Description string `json:"description"`

	// DomainId A domain id
	DomainId DomainId `json:"domain_id"`

	// DomainName A name of a domain (all lower-case). The domain name can only be set during initial registration and not be modified by updates.
	DomainName DomainName `json:"domain_name"`

	// DomainType Type of domain (currently only rhel-idm)
	DomainType DomainType `json:"domain_type"`

	// Title Human-friendly title for the domain entry.
	Title string `json:"title"`
}

ListDomainsData The data listed for the domains.

type ListDomainsParams

type ListDomainsParams struct {
	// Offset pagination offset
	Offset *int `form:"offset,omitempty" json:"offset,omitempty"`

	// Limit Number of items per page
	Limit *int `form:"limit,omitempty" json:"limit,omitempty"`

	// XRhInsightsRequestId Request id for distributed tracing.
	XRhInsightsRequestId *XRhInsightsRequestIdHeader `json:"X-Rh-Insights-Request-Id,omitempty"`
}

ListDomainsParams defines parameters for ListDomains.

type ListDomainsResponse

type ListDomainsResponse = ListDomainsResponseSchema

ListDomainsResponse Represent a paginated result for a list of domains

type ListDomainsResponseSchema

type ListDomainsResponseSchema struct {
	// Data The content for this page.
	Data []ListDomainsData `json:"data"`

	// Links Represent the navigation links for the data paginated.
	Links PaginationLinks `json:"links"`

	// Meta Metadata for the paginated responses.
	Meta PaginationMeta `json:"meta"`
}

ListDomainsResponseSchema Represent a paginated result for a list of domains

type Location

type Location struct {
	Description *string `json:"description,omitempty"`

	// Name A location identifier (lower-case DNS label)
	Name LocationName `json:"name"`
}

Location RHEL IdM server location

type LocationName

type LocationName = string

LocationName A location identifier (lower-case DNS label)

type PaginationLinks struct {
	// First Reference to the first page of the request.
	First *string `json:"first,omitempty"`

	// Last Reference to the last page of the request.
	Last *string `json:"last,omitempty"`

	// Next Reference to the next page of the request.
	Next *string `json:"next,omitempty"`

	// Previous Reference to the previous page of the request.
	Previous *string `json:"previous,omitempty"`
}

PaginationLinks Represent the navigation links for the data paginated.

type PaginationMeta

type PaginationMeta struct {
	// Count total records in the collection.
	Count int64 `json:"count"`

	// Limit Number of items per page.
	Limit int `json:"limit"`

	// Offset Initial record of the page.
	Offset int `json:"offset"`
}

PaginationMeta Metadata for the paginated responses.

type ReadDomainParams

type ReadDomainParams struct {
	// XRhInsightsRequestId Request id for distributed tracing.
	XRhInsightsRequestId *XRhInsightsRequestIdHeader `json:"X-Rh-Insights-Request-Id,omitempty"`
}

ReadDomainParams defines parameters for ReadDomain.

type ReadDomainResponse

type ReadDomainResponse = DomainResponse

ReadDomainResponse A domain resource

type ReadKeysResponse

type ReadKeysResponse = SigningKeysResponse

ReadKeysResponse Serialized JWKs with revocation information

type RealmName

type RealmName = string

RealmName A Kerberos realm name (usually all upper-case domain name). The realm can only be set during initial registration and not be modified by updates.

type RegisterDomainJSONRequestBody

type RegisterDomainJSONRequestBody = RegisterDomainRequest

RegisterDomainJSONRequestBody defines body for RegisterDomain for application/json ContentType.

type RegisterDomainParams

type RegisterDomainParams struct {
	// XRhIdmRegistrationToken One-time password to authenticate domain registration with ipa-hcc command.
	XRhIdmRegistrationToken XRhIdmRegistrationTokenHeader `json:"X-Rh-Idm-Registration-Token"`

	// XRhIdmVersion ipa-hcc agent version
	XRhIdmVersion XRhIdmVersionHeader `json:"X-Rh-Idm-Version"`

	// XRhInsightsRequestId Request id for distributed tracing.
	XRhInsightsRequestId *XRhInsightsRequestIdHeader `json:"X-Rh-Insights-Request-Id,omitempty"`
}

RegisterDomainParams defines parameters for RegisterDomain.

type RegisterDomainRequest

type RegisterDomainRequest = Domain

RegisterDomainRequest A domain resource

type RegisterDomainResponse

type RegisterDomainResponse = DomainRegisterResponse

RegisterDomainResponse TODO

type ServerInterface

type ServerInterface interface {
	// List domains in the organization
	// (GET /domains)
	ListDomains(ctx echo.Context, params ListDomainsParams) error
	// Register a domain.
	// (POST /domains)
	RegisterDomain(ctx echo.Context, params RegisterDomainParams) error
	// Domain registration token request
	// (POST /domains/token)
	CreateDomainToken(ctx echo.Context, params CreateDomainTokenParams) error
	// Delete domain.
	// (DELETE /domains/{uuid})
	DeleteDomain(ctx echo.Context, uuid DomainIdParam, params DeleteDomainParams) error
	// Read a domain.
	// (GET /domains/{uuid})
	ReadDomain(ctx echo.Context, uuid DomainIdParam, params ReadDomainParams) error
	// Update domain information by user.
	// (PATCH /domains/{uuid})
	UpdateDomainUser(ctx echo.Context, uuid DomainIdParam, params UpdateDomainUserParams) error
	// Update domain information by ipa-hcc agent.
	// (PUT /domains/{uuid})
	UpdateDomainAgent(ctx echo.Context, uuid DomainIdParam, params UpdateDomainAgentParams) error
	// Get host vm information.
	// (POST /host-conf/{inventory_id}/{fqdn})
	HostConf(ctx echo.Context, inventoryId HostId, fqdn Fqdn, params HostConfParams) error
	// Signing keys
	// (GET /signing_keys)
	GetSigningKeys(ctx echo.Context, params GetSigningKeysParams) error
}

ServerInterface represents all server handlers.

type ServerInterfaceWrapper

type ServerInterfaceWrapper struct {
	Handler ServerInterface
}

ServerInterfaceWrapper converts echo contexts to parameters.

func (*ServerInterfaceWrapper) CreateDomainToken

func (w *ServerInterfaceWrapper) CreateDomainToken(ctx echo.Context) error

CreateDomainToken converts echo context to params.

func (*ServerInterfaceWrapper) DeleteDomain

func (w *ServerInterfaceWrapper) DeleteDomain(ctx echo.Context) error

DeleteDomain converts echo context to params.

func (*ServerInterfaceWrapper) GetSigningKeys

func (w *ServerInterfaceWrapper) GetSigningKeys(ctx echo.Context) error

GetSigningKeys converts echo context to params.

func (*ServerInterfaceWrapper) HostConf

func (w *ServerInterfaceWrapper) HostConf(ctx echo.Context) error

HostConf converts echo context to params.

func (*ServerInterfaceWrapper) ListDomains

func (w *ServerInterfaceWrapper) ListDomains(ctx echo.Context) error

ListDomains converts echo context to params.

func (*ServerInterfaceWrapper) ReadDomain

func (w *ServerInterfaceWrapper) ReadDomain(ctx echo.Context) error

ReadDomain converts echo context to params.

func (*ServerInterfaceWrapper) RegisterDomain

func (w *ServerInterfaceWrapper) RegisterDomain(ctx echo.Context) error

RegisterDomain converts echo context to params.

func (*ServerInterfaceWrapper) UpdateDomainAgent

func (w *ServerInterfaceWrapper) UpdateDomainAgent(ctx echo.Context) error

UpdateDomainAgent converts echo context to params.

func (*ServerInterfaceWrapper) UpdateDomainUser

func (w *ServerInterfaceWrapper) UpdateDomainUser(ctx echo.Context) error

UpdateDomainUser converts echo context to params.

type SigningKeysResponse

type SigningKeysResponse struct {
	// Keys An array of serialized JSON Web Keys (JWK strings)
	Keys []string `json:"keys"`

	// RevokedKids An array of revoked key identifiers (JWK kid)
	RevokedKids *[]string `json:"revoked_kids,omitempty"`
}

SigningKeysResponse Serialized JWKs with revocation information

type SubscriptionManagerId

type SubscriptionManagerId = openapi_types.UUID

SubscriptionManagerId A Red Hat Subcription Manager ID of a RHEL host.

type UpdateDomainAgentJSONRequestBody

type UpdateDomainAgentJSONRequestBody = UpdateDomainAgentRequest

UpdateDomainAgentJSONRequestBody defines body for UpdateDomainAgent for application/json ContentType.

type UpdateDomainAgentParams

type UpdateDomainAgentParams struct {
	// XRhIdmVersion ipa-hcc agent version
	XRhIdmVersion XRhIdmVersionHeader `json:"X-Rh-Idm-Version"`

	// XRhInsightsRequestId Request id for distributed tracing.
	XRhInsightsRequestId *XRhInsightsRequestIdHeader `json:"X-Rh-Insights-Request-Id,omitempty"`
}

UpdateDomainAgentParams defines parameters for UpdateDomainAgent.

type UpdateDomainAgentRequest

type UpdateDomainAgentRequest struct {
	// DomainName A name of a domain (all lower-case). The domain name can only be set during initial registration and not be modified by updates.
	DomainName DomainName `json:"domain_name"`

	// DomainType Type of domain (currently only rhel-idm)
	DomainType DomainType `json:"domain_type"`

	// RhelIdm Options for ipa domains
	RhelIdm DomainIpa `json:"rhel-idm"`
}

UpdateDomainAgentRequest A domain resource

type UpdateDomainAgentResponse

type UpdateDomainAgentResponse = DomainUpdateResponse

UpdateDomainAgentResponse TODO

type UpdateDomainUserJSONRequestBody

type UpdateDomainUserJSONRequestBody = UpdateDomainUserRequest

UpdateDomainUserJSONRequestBody defines body for UpdateDomainUser for application/json ContentType.

type UpdateDomainUserParams

type UpdateDomainUserParams struct {
	// XRhInsightsRequestId Request id for distributed tracing.
	XRhInsightsRequestId *XRhInsightsRequestIdHeader `json:"X-Rh-Insights-Request-Id,omitempty"`
}

UpdateDomainUserParams defines parameters for UpdateDomainUser.

type UpdateDomainUserRequest

type UpdateDomainUserRequest struct {
	// AutoEnrollmentEnabled Enable or disable host vm auto-enrollment for this domain
	AutoEnrollmentEnabled *bool `json:"auto_enrollment_enabled,omitempty"`

	// Description Human readable description abou the domain.
	Description *string `json:"description,omitempty"`

	// Title Title to describe the domain.
	Title *string `json:"title,omitempty"`
}

UpdateDomainUserRequest A domain resource

type UpdateDomainUserResponse

type UpdateDomainUserResponse = DomainResponse

UpdateDomainUserResponse A domain resource

type XRhIdmRegistrationTokenHeader

type XRhIdmRegistrationTokenHeader = string

XRhIdmRegistrationTokenHeader defines model for XRhIdmRegistrationTokenHeader.

type XRhIdmVersionHeader

type XRhIdmVersionHeader = string

XRhIdmVersionHeader defines model for XRhIdmVersionHeader.

type XRhInsightsRequestIdHeader

type XRhInsightsRequestIdHeader = string

XRhInsightsRequestIdHeader defines model for XRhInsightsRequestIdHeader.

Jump to

Keyboard shortcuts

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