gorge

package
v0.0.0-...-581c459 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrTypeAssertionError is thrown when type an interface does not match the asserted type
	ErrTypeAssertionError = errors.New("unable to assert type")
)

Functions

func AssertAddReleaseRequestConstraints

func AssertAddReleaseRequestConstraints(obj AddReleaseRequest) error

AssertAddReleaseRequestConstraints checks if the values respects the defined constraints

func AssertAddReleaseRequestRequired

func AssertAddReleaseRequestRequired(obj AddReleaseRequest) error

AssertAddReleaseRequestRequired checks if the required fields are not zero-ed

func AssertAddSearchFilter409ResponseConstraints

func AssertAddSearchFilter409ResponseConstraints(obj AddSearchFilter409Response) error

AssertAddSearchFilter409ResponseConstraints checks if the values respects the defined constraints

func AssertAddSearchFilter409ResponseRequired

func AssertAddSearchFilter409ResponseRequired(obj AddSearchFilter409Response) error

AssertAddSearchFilter409ResponseRequired checks if the required fields are not zero-ed

func AssertDeleteUserSearchFilter403ResponseConstraints

func AssertDeleteUserSearchFilter403ResponseConstraints(obj DeleteUserSearchFilter403Response) error

AssertDeleteUserSearchFilter403ResponseConstraints checks if the values respects the defined constraints

func AssertDeleteUserSearchFilter403ResponseRequired

func AssertDeleteUserSearchFilter403ResponseRequired(obj DeleteUserSearchFilter403Response) error

AssertDeleteUserSearchFilter403ResponseRequired checks if the required fields are not zero-ed

func AssertDeprecationRequestConstraints

func AssertDeprecationRequestConstraints(obj DeprecationRequest) error

AssertDeprecationRequestConstraints checks if the values respects the defined constraints

func AssertDeprecationRequestParamsConstraints

func AssertDeprecationRequestParamsConstraints(obj DeprecationRequestParams) error

AssertDeprecationRequestParamsConstraints checks if the values respects the defined constraints

func AssertDeprecationRequestParamsRequired

func AssertDeprecationRequestParamsRequired(obj DeprecationRequestParams) error

AssertDeprecationRequestParamsRequired checks if the required fields are not zero-ed

func AssertDeprecationRequestRequired

func AssertDeprecationRequestRequired(obj DeprecationRequest) error

AssertDeprecationRequestRequired checks if the required fields are not zero-ed

func AssertGetFile400ResponseConstraints

func AssertGetFile400ResponseConstraints(obj GetFile400Response) error

AssertGetFile400ResponseConstraints checks if the values respects the defined constraints

func AssertGetFile400ResponseRequired

func AssertGetFile400ResponseRequired(obj GetFile400Response) error

AssertGetFile400ResponseRequired checks if the required fields are not zero-ed

func AssertGetFile404ResponseConstraints

func AssertGetFile404ResponseConstraints(obj GetFile404Response) error

AssertGetFile404ResponseConstraints checks if the values respects the defined constraints

func AssertGetFile404ResponseRequired

func AssertGetFile404ResponseRequired(obj GetFile404Response) error

AssertGetFile404ResponseRequired checks if the required fields are not zero-ed

func AssertGetModules200ResponseConstraints

func AssertGetModules200ResponseConstraints(obj GetModules200Response) error

AssertGetModules200ResponseConstraints checks if the values respects the defined constraints

func AssertGetModules200ResponsePaginationConstraints

func AssertGetModules200ResponsePaginationConstraints(obj GetModules200ResponsePagination) error

AssertGetModules200ResponsePaginationConstraints checks if the values respects the defined constraints

func AssertGetModules200ResponsePaginationRequired

func AssertGetModules200ResponsePaginationRequired(obj GetModules200ResponsePagination) error

AssertGetModules200ResponsePaginationRequired checks if the required fields are not zero-ed

func AssertGetModules200ResponseRequired

func AssertGetModules200ResponseRequired(obj GetModules200Response) error

AssertGetModules200ResponseRequired checks if the required fields are not zero-ed

func AssertGetReleasePlans200ResponseConstraints

func AssertGetReleasePlans200ResponseConstraints(obj GetReleasePlans200Response) error

AssertGetReleasePlans200ResponseConstraints checks if the values respects the defined constraints

func AssertGetReleasePlans200ResponsePaginationConstraints

func AssertGetReleasePlans200ResponsePaginationConstraints(obj GetReleasePlans200ResponsePagination) error

AssertGetReleasePlans200ResponsePaginationConstraints checks if the values respects the defined constraints

func AssertGetReleasePlans200ResponsePaginationRequired

func AssertGetReleasePlans200ResponsePaginationRequired(obj GetReleasePlans200ResponsePagination) error

AssertGetReleasePlans200ResponsePaginationRequired checks if the required fields are not zero-ed

func AssertGetReleasePlans200ResponseRequired

func AssertGetReleasePlans200ResponseRequired(obj GetReleasePlans200Response) error

AssertGetReleasePlans200ResponseRequired checks if the required fields are not zero-ed

func AssertGetReleases200ResponseConstraints

func AssertGetReleases200ResponseConstraints(obj GetReleases200Response) error

AssertGetReleases200ResponseConstraints checks if the values respects the defined constraints

func AssertGetReleases200ResponsePaginationConstraints

func AssertGetReleases200ResponsePaginationConstraints(obj GetReleases200ResponsePagination) error

AssertGetReleases200ResponsePaginationConstraints checks if the values respects the defined constraints

func AssertGetReleases200ResponsePaginationRequired

func AssertGetReleases200ResponsePaginationRequired(obj GetReleases200ResponsePagination) error

AssertGetReleases200ResponsePaginationRequired checks if the required fields are not zero-ed

func AssertGetReleases200ResponseRequired

func AssertGetReleases200ResponseRequired(obj GetReleases200Response) error

AssertGetReleases200ResponseRequired checks if the required fields are not zero-ed

func AssertGetUserSearchFilters401ResponseConstraints

func AssertGetUserSearchFilters401ResponseConstraints(obj GetUserSearchFilters401Response) error

AssertGetUserSearchFilters401ResponseConstraints checks if the values respects the defined constraints

func AssertGetUserSearchFilters401ResponseRequired

func AssertGetUserSearchFilters401ResponseRequired(obj GetUserSearchFilters401Response) error

AssertGetUserSearchFilters401ResponseRequired checks if the required fields are not zero-ed

func AssertGetUsers200ResponseConstraints

func AssertGetUsers200ResponseConstraints(obj GetUsers200Response) error

AssertGetUsers200ResponseConstraints checks if the values respects the defined constraints

func AssertGetUsers200ResponsePaginationConstraints

func AssertGetUsers200ResponsePaginationConstraints(obj GetUsers200ResponsePagination) error

AssertGetUsers200ResponsePaginationConstraints checks if the values respects the defined constraints

func AssertGetUsers200ResponsePaginationRequired

func AssertGetUsers200ResponsePaginationRequired(obj GetUsers200ResponsePagination) error

AssertGetUsers200ResponsePaginationRequired checks if the required fields are not zero-ed

func AssertGetUsers200ResponseRequired

func AssertGetUsers200ResponseRequired(obj GetUsers200Response) error

AssertGetUsers200ResponseRequired checks if the required fields are not zero-ed

func AssertModuleAbbreviatedConstraints

func AssertModuleAbbreviatedConstraints(obj ModuleAbbreviated) error

AssertModuleAbbreviatedConstraints checks if the values respects the defined constraints

func AssertModuleAbbreviatedRequired

func AssertModuleAbbreviatedRequired(obj ModuleAbbreviated) error

AssertModuleAbbreviatedRequired checks if the required fields are not zero-ed

func AssertModuleConstraints

func AssertModuleConstraints(obj Module) error

AssertModuleConstraints checks if the values respects the defined constraints

func AssertModuleCurrentReleaseConstraints

func AssertModuleCurrentReleaseConstraints(obj ModuleCurrentRelease) error

AssertModuleCurrentReleaseConstraints checks if the values respects the defined constraints

func AssertModuleCurrentReleaseRequired

func AssertModuleCurrentReleaseRequired(obj ModuleCurrentRelease) error

AssertModuleCurrentReleaseRequired checks if the required fields are not zero-ed

func AssertModuleMinimalConstraints

func AssertModuleMinimalConstraints(obj ModuleMinimal) error

AssertModuleMinimalConstraints checks if the values respects the defined constraints

func AssertModuleMinimalRequired

func AssertModuleMinimalRequired(obj ModuleMinimal) error

AssertModuleMinimalRequired checks if the required fields are not zero-ed

func AssertModuleOwnerConstraints

func AssertModuleOwnerConstraints(obj ModuleOwner) error

AssertModuleOwnerConstraints checks if the values respects the defined constraints

func AssertModuleOwnerRequired

func AssertModuleOwnerRequired(obj ModuleOwner) error

AssertModuleOwnerRequired checks if the required fields are not zero-ed

func AssertModuleRequired

func AssertModuleRequired(obj Module) error

AssertModuleRequired checks if the required fields are not zero-ed

func AssertModuleSupersededByConstraints

func AssertModuleSupersededByConstraints(obj ModuleSupersededBy) error

AssertModuleSupersededByConstraints checks if the values respects the defined constraints

func AssertModuleSupersededByRequired

func AssertModuleSupersededByRequired(obj ModuleSupersededBy) error

AssertModuleSupersededByRequired checks if the required fields are not zero-ed

func AssertPaginationConstraints

func AssertPaginationConstraints(obj Pagination) error

AssertPaginationConstraints checks if the values respects the defined constraints

func AssertPaginationRequired

func AssertPaginationRequired(obj Pagination) error

AssertPaginationRequired checks if the required fields are not zero-ed

func AssertRecurseInterfaceRequired

func AssertRecurseInterfaceRequired[T any](obj interface{}, callback func(T) error) error

AssertRecurseInterfaceRequired recursively checks each struct in a slice against the callback. This method traverse nested slices in a preorder fashion.

func AssertRecurseValueRequired

func AssertRecurseValueRequired[T any](value reflect.Value, callback func(T) error) error

AssertRecurseValueRequired checks each struct in the nested slice against the callback. This method traverse nested slices in a preorder fashion. ErrTypeAssertionError is thrown if the underlying struct does not match type T.

func AssertReleaseAbbreviatedConstraints

func AssertReleaseAbbreviatedConstraints(obj ReleaseAbbreviated) error

AssertReleaseAbbreviatedConstraints checks if the values respects the defined constraints

func AssertReleaseAbbreviatedRequired

func AssertReleaseAbbreviatedRequired(obj ReleaseAbbreviated) error

AssertReleaseAbbreviatedRequired checks if the required fields are not zero-ed

func AssertReleaseConstraints

func AssertReleaseConstraints(obj Release) error

AssertReleaseConstraints checks if the values respects the defined constraints

func AssertReleaseMinimalConstraints

func AssertReleaseMinimalConstraints(obj ReleaseMinimal) error

AssertReleaseMinimalConstraints checks if the values respects the defined constraints

func AssertReleaseMinimalRequired

func AssertReleaseMinimalRequired(obj ReleaseMinimal) error

AssertReleaseMinimalRequired checks if the required fields are not zero-ed

func AssertReleaseModuleConstraints

func AssertReleaseModuleConstraints(obj ReleaseModule) error

AssertReleaseModuleConstraints checks if the values respects the defined constraints

func AssertReleaseModuleRequired

func AssertReleaseModuleRequired(obj ReleaseModule) error

AssertReleaseModuleRequired checks if the required fields are not zero-ed

func AssertReleasePlanAbbreviatedConstraints

func AssertReleasePlanAbbreviatedConstraints(obj ReleasePlanAbbreviated) error

AssertReleasePlanAbbreviatedConstraints checks if the values respects the defined constraints

func AssertReleasePlanAbbreviatedRequired

func AssertReleasePlanAbbreviatedRequired(obj ReleasePlanAbbreviated) error

AssertReleasePlanAbbreviatedRequired checks if the required fields are not zero-ed

func AssertReleasePlanConstraints

func AssertReleasePlanConstraints(obj ReleasePlan) error

AssertReleasePlanConstraints checks if the values respects the defined constraints

func AssertReleasePlanPlanMetadataConstraints

func AssertReleasePlanPlanMetadataConstraints(obj ReleasePlanPlanMetadata) error

AssertReleasePlanPlanMetadataConstraints checks if the values respects the defined constraints

func AssertReleasePlanPlanMetadataDocstringConstraints

func AssertReleasePlanPlanMetadataDocstringConstraints(obj ReleasePlanPlanMetadataDocstring) error

AssertReleasePlanPlanMetadataDocstringConstraints checks if the values respects the defined constraints

func AssertReleasePlanPlanMetadataDocstringRequired

func AssertReleasePlanPlanMetadataDocstringRequired(obj ReleasePlanPlanMetadataDocstring) error

AssertReleasePlanPlanMetadataDocstringRequired checks if the required fields are not zero-ed

func AssertReleasePlanPlanMetadataDocstringTagsInnerConstraints

func AssertReleasePlanPlanMetadataDocstringTagsInnerConstraints(obj ReleasePlanPlanMetadataDocstringTagsInner) error

AssertReleasePlanPlanMetadataDocstringTagsInnerConstraints checks if the values respects the defined constraints

func AssertReleasePlanPlanMetadataDocstringTagsInnerRequired

func AssertReleasePlanPlanMetadataDocstringTagsInnerRequired(obj ReleasePlanPlanMetadataDocstringTagsInner) error

AssertReleasePlanPlanMetadataDocstringTagsInnerRequired checks if the required fields are not zero-ed

func AssertReleasePlanPlanMetadataRequired

func AssertReleasePlanPlanMetadataRequired(obj ReleasePlanPlanMetadata) error

AssertReleasePlanPlanMetadataRequired checks if the required fields are not zero-ed

func AssertReleasePlanRequired

func AssertReleasePlanRequired(obj ReleasePlan) error

AssertReleasePlanRequired checks if the required fields are not zero-ed

func AssertReleaseRequired

func AssertReleaseRequired(obj Release) error

AssertReleaseRequired checks if the required fields are not zero-ed

func AssertReleaseTaskConstraints

func AssertReleaseTaskConstraints(obj ReleaseTask) error

AssertReleaseTaskConstraints checks if the values respects the defined constraints

func AssertReleaseTaskRequired

func AssertReleaseTaskRequired(obj ReleaseTask) error

AssertReleaseTaskRequired checks if the required fields are not zero-ed

func AssertSearchFilterConstraints

func AssertSearchFilterConstraints(obj SearchFilter) error

AssertSearchFilterConstraints checks if the values respects the defined constraints

func AssertSearchFilterRequired

func AssertSearchFilterRequired(obj SearchFilter) error

AssertSearchFilterRequired checks if the required fields are not zero-ed

func AssertSearchFilterResponseConstraints

func AssertSearchFilterResponseConstraints(obj SearchFilterResponse) error

AssertSearchFilterResponseConstraints checks if the values respects the defined constraints

func AssertSearchFilterResponseRequired

func AssertSearchFilterResponseRequired(obj SearchFilterResponse) error

AssertSearchFilterResponseRequired checks if the required fields are not zero-ed

func AssertUserAbbreviatedConstraints

func AssertUserAbbreviatedConstraints(obj UserAbbreviated) error

AssertUserAbbreviatedConstraints checks if the values respects the defined constraints

func AssertUserAbbreviatedRequired

func AssertUserAbbreviatedRequired(obj UserAbbreviated) error

AssertUserAbbreviatedRequired checks if the required fields are not zero-ed

func AssertUserConstraints

func AssertUserConstraints(obj User) error

AssertUserConstraints checks if the values respects the defined constraints

func AssertUserRequired

func AssertUserRequired(obj User) error

AssertUserRequired checks if the required fields are not zero-ed

func DefaultErrorHandler

func DefaultErrorHandler(w http.ResponseWriter, r *http.Request, err error, result *ImplResponse)

DefaultErrorHandler defines the default logic on how to handle errors from the controller. Any errors from parsing request params will return a StatusBadRequest. Otherwise, the error code originating from the servicer will be used.

func EncodeJSONResponse

func EncodeJSONResponse(i interface{}, status *int, w http.ResponseWriter) error

EncodeJSONResponse uses the json encoder to write an interface to the http response with an optional status code

func IsZeroValue

func IsZeroValue(val interface{}) bool

IsZeroValue checks if the val is the zero-ed value.

func Logger

func Logger(inner http.Handler, name string) http.Handler

func NewRouter

func NewRouter(routers ...Router) chi.Router

NewRouter creates a new router for any number of api routers

func ReadFormFileToTempFile

func ReadFormFileToTempFile(r *http.Request, key string) (*os.File, error)

ReadFormFileToTempFile reads file data from a request form and writes it to a temporary file

func ReadFormFilesToTempFiles

func ReadFormFilesToTempFiles(r *http.Request, key string) ([]*os.File, error)

ReadFormFilesToTempFiles reads files array data from a request form and writes it to a temporary files

Types

type AddReleaseRequest

type AddReleaseRequest struct {
	File string `json:"file,omitempty"`
}

type AddSearchFilter409Response

type AddSearchFilter409Response struct {
	Message string `json:"message,omitempty"`

	Errors []string `json:"errors,omitempty"`
}

type Constraint

type Constraint[T Number | string | bool] func(actual T) error

func WithMaximum

func WithMaximum[T Number](expected T) Constraint[T]

func WithMinimum

func WithMinimum[T Number](expected T) Constraint[T]

type DeleteUserSearchFilter403Response

type DeleteUserSearchFilter403Response struct {
	Message string `json:"message,omitempty"`

	Errors []string `json:"errors,omitempty"`
}

type DeprecationRequest

type DeprecationRequest struct {

	// Action to take on resource. 'deprecate' is currently the only valid option.
	Action string `json:"action,omitempty"`

	Params *DeprecationRequestParams `json:"params,omitempty"`
}

type DeprecationRequestParams

type DeprecationRequestParams struct {

	// Reason for deprecation
	Reason *string `json:"reason,omitempty"`

	// Slug identifying a replacement Module. Accepts legacy (case-sensitive) module naming.
	ReplacementSlug *string `json:"replacement_slug,omitempty"`
}

type ErrorHandler

type ErrorHandler func(w http.ResponseWriter, r *http.Request, err error, result *ImplResponse)

ErrorHandler defines the required method for handling error. You may implement it and inject this into a controller if you would like errors to be handled differently from the DefaultErrorHandler

type GetFile400Response

type GetFile400Response struct {
	Message string `json:"message,omitempty"`

	Errors []string `json:"errors,omitempty"`
}

type GetFile404Response

type GetFile404Response struct {
	Message string `json:"message,omitempty"`

	Errors []string `json:"errors,omitempty"`
}

type GetModules200Response

type GetModules200Response struct {
	Pagination GetModules200ResponsePagination `json:"pagination,omitempty"`

	Results []Module `json:"results,omitempty"`
}

type GetModules200ResponsePagination

type GetModules200ResponsePagination struct {

	// Maximum number of results per page
	Limit int32 `json:"limit,omitempty"`

	// Current page's offset from the beginning of the result set
	Offset int32 `json:"offset,omitempty"`

	First *interface{} `json:"first,omitempty"`

	// Relative URL for the previous page of the result set, or `null` if this is the first page
	Previous *string `json:"previous,omitempty"`

	Current *interface{} `json:"current,omitempty"`

	Next *interface{} `json:"next,omitempty"`

	// Total number of all results
	Total int32 `json:"total,omitempty"`
}

type GetReleasePlans200Response

type GetReleasePlans200Response struct {
	Pagination GetReleasePlans200ResponsePagination `json:"pagination,omitempty"`

	Results []ReleasePlan `json:"results,omitempty"`
}

type GetReleasePlans200ResponsePagination

type GetReleasePlans200ResponsePagination struct {

	// Maximum number of results per page
	Limit int32 `json:"limit,omitempty"`

	// Current page's offset from the beginning of the result set
	Offset int32 `json:"offset,omitempty"`

	First *interface{} `json:"first,omitempty"`

	// Relative URL for the previous page of the result set, or `null` if this is the first page
	Previous *string `json:"previous,omitempty"`

	Current *interface{} `json:"current,omitempty"`

	Next *interface{} `json:"next,omitempty"`

	// Total number of all results
	Total int32 `json:"total,omitempty"`
}

type GetReleases200Response

type GetReleases200Response struct {
	Pagination GetReleases200ResponsePagination `json:"pagination,omitempty"`

	Results []Release `json:"results,omitempty"`
}

type GetReleases200ResponsePagination

type GetReleases200ResponsePagination struct {

	// Maximum number of results per page
	Limit int32 `json:"limit,omitempty"`

	// Current page's offset from the beginning of the result set
	Offset int32 `json:"offset,omitempty"`

	First *interface{} `json:"first,omitempty"`

	// Relative URL for the previous page of the result set, or `null` if this is the first page
	Previous *string `json:"previous,omitempty"`

	Current *interface{} `json:"current,omitempty"`

	Next *interface{} `json:"next,omitempty"`

	// Total number of all results
	Total int32 `json:"total,omitempty"`
}

type GetUserSearchFilters401Response

type GetUserSearchFilters401Response struct {
	Message string `json:"message,omitempty"`

	Errors []string `json:"errors,omitempty"`
}

type GetUsers200Response

type GetUsers200Response struct {
	Pagination GetUsers200ResponsePagination `json:"pagination,omitempty"`

	Results []User `json:"results,omitempty"`
}

type GetUsers200ResponsePagination

type GetUsers200ResponsePagination struct {

	// Maximum number of results per page
	Limit int32 `json:"limit,omitempty"`

	// Current page's offset from the beginning of the result set
	Offset int32 `json:"offset,omitempty"`

	First *interface{} `json:"first,omitempty"`

	// Relative URL for the previous page of the result set, or `null` if this is the first page
	Previous *string `json:"previous,omitempty"`

	Current *interface{} `json:"current,omitempty"`

	Next *interface{} `json:"next,omitempty"`

	// Total number of all results
	Total int32 `json:"total,omitempty"`
}

type ImplResponse

type ImplResponse struct {
	Code int
	Body interface{}
}

ImplResponse defines an implementation response with error code and the associated body

func Response

func Response(code int, body interface{}) ImplResponse

Response return a ImplResponse struct filled

type Module

type Module struct {
	// Relative URL for this Module resource
	Uri string `json:"uri,omitempty"`

	// Unique textual identifier for this Module resource
	Slug string `json:"slug,omitempty"`

	// Base name of this module (without username/namespace)
	Name string `json:"name,omitempty"`

	// Total download count for all released versions of this module
	Downloads int32 `json:"downloads,omitempty"`

	// Date and time this Module resource was created
	CreatedAt string `json:"created_at,omitempty"`

	// Date and time this Module resource was last modified
	UpdatedAt string `json:"updated_at,omitempty"`

	// Date and time this Module resource was marked as deprecated by the owner
	DeprecatedAt *string `json:"deprecated_at,omitempty"`

	// Reason provided by the owner for marking this module as deprecated
	DeprecatedFor *string `json:"deprecated_for,omitempty"`

	SupersededBy ModuleSupersededBy `json:"superseded_by,omitempty"`

	// Whether or not this module is a [Supported module](https://forge.puppet.com/supported), see `endorsement` field instead
	// Deprecated
	Supported bool `json:"supported,omitempty"`

	// Indicates whether a module is endorsed through the Supported, Approved or Partner Supported programs, or `null` if not endorsed
	Endorsement *string `json:"endorsement,omitempty"`

	// Indicates whether or not a module is licensed for use by Puppet Enterprise customers only, indicated by a value of `pe_only`, for all other modules this value will be `base`
	ModuleGroup string `json:"module_group,omitempty"`

	// Whether this module is premium (requires payment to download)
	Premium bool `json:"premium,omitempty"`

	Owner ModuleOwner `json:"owner,omitempty"`

	CurrentRelease ModuleCurrentRelease `json:"current_release,omitempty"`

	// Array of abbreviated representations of all published Releases of this module
	Releases []ReleaseAbbreviated `json:"releases,omitempty"`

	// Numeric score representing the average rating this module has received from Forge users
	FeedbackScore int32 `json:"feedback_score,omitempty"`

	// Author-provided URL for this module's homepage
	HomepageUrl string `json:"homepage_url,omitempty"`

	// Author-provided URL for reporting issues about this module
	IssuesUrl string `json:"issues_url,omitempty"`
}

type ModuleAbbreviated

type ModuleAbbreviated struct {

	// Relative URL for this Module resource
	Uri string `json:"uri,omitempty"`

	// Unique textual identifier for this Module resource
	Slug string `json:"slug,omitempty"`

	// Base name of this module (without username/namespace)
	Name string `json:"name,omitempty"`

	// Date and time this Module resource was marked as deprecated by the owner
	DeprecatedAt *string `json:"deprecated_at,omitempty"`

	Owner ModuleOwner `json:"owner,omitempty"`
}

type ModuleCurrentRelease

type ModuleCurrentRelease struct {

	// Relative URL for this Release resource
	Uri string `json:"uri,omitempty"`

	// Unique textual identifier for this Release resource
	Slug string `json:"slug,omitempty"`

	Module ReleaseModule `json:"module,omitempty"`

	Version string `json:"version,omitempty"`

	// Verbatim contents of release's `metadata.json` file
	Metadata map[string]interface{} `json:"metadata,omitempty"`

	// List of tags applied to this module release (derived from `metadata.json`)
	Tags []string `json:"tags,omitempty"`

	// Indicates whether or not this specific module release is supported, this value is no longer relevant, please see the `endorsement` property of the parent module instead
	// Deprecated
	Supported bool `json:"supported,omitempty"`

	// Indicates whether or not this module release's metadata contains [Puppet Development Kit](https://puppet.com/docs/pdk/latest/pdk.html) related keys/values
	Pdk bool `json:"pdk,omitempty"`

	// Numeric value representing module release's \"Quality score\", see [module scoring](https://forge.puppet.com/about/scoring) to learn more
	ValidationScore int32 `json:"validation_score,omitempty"`

	// Relative or absolute URL to download this release's tarball
	FileUri string `json:"file_uri,omitempty"`

	// Size of this release's tarball in bytes
	FileSize int32 `json:"file_size,omitempty"`

	// MD5 checksum for this release's tarball, can be used to verify successful download
	FileMd5 string `json:"file_md5,omitempty"`

	// SHA-256 checksum for this release's tarball, can be used to verify successful download
	FileSha256 string `json:"file_sha256,omitempty"`

	// Number of times this release has been downloaded through the Forge
	Downloads int32 `json:"downloads,omitempty"`

	// Contents of this release's README file, optionally converted to HTML format if possible (see `with_html` param)
	Readme string `json:"readme,omitempty"`

	// Contents of this release's CHANGELOG file, optionally converted to HTML format if possible (see `with_html` param)
	Changelog string `json:"changelog,omitempty"`

	// Contents of this release's LICENSE file, optionally converted to HTML format if possible (see `with_html` param)
	License string `json:"license,omitempty"`

	// Contents of this release's REFERENCE file, optionally converted to HTML format if possible (see `with_html` param)
	Reference string `json:"reference,omitempty"`

	// (OPTIONAL) Automatically generated documentation for custom Types included in this module release, see `reference` key instead (This field is not included in response by default, see `include_fields` param for more info)
	// Deprecated
	Docs map[string]interface{} `json:"docs,omitempty"`

	// (OPTIONAL) List of compatible PE versions for the release. This is calculated from the Puppet version requirement if one is provided in the module metadata. If a PE version but no Puppet version is provided, the PE version requirement will be returned. (This field is not included in response by default, see `include_fields` param for more info)
	PeCompatibility *[]string `json:"pe_compatibility,omitempty"`

	// Metadata for any Bolt tasks included in this module release
	Tasks []ReleaseTask `json:"tasks,omitempty"`

	// Links to metadata for Bolt plans included in this module release
	Plans []ReleasePlanAbbreviated `json:"plans,omitempty"`

	// Date and time this Release resource was created
	CreatedAt string `json:"created_at,omitempty"`

	// Date and time this Release resource was last updated
	UpdatedAt string `json:"updated_at,omitempty"`

	// Date and time this Release resource was marked as deleted
	DeletedAt *string `json:"deleted_at,omitempty"`

	// Author-provided reason that this module release was marked as deleted
	DeletedFor *string `json:"deleted_for,omitempty"`
}

type ModuleMinimal

type ModuleMinimal struct {

	// Relative URL for this Module resource
	Uri string `json:"uri,omitempty"`

	// Unique textual identifier for this Module resource
	Slug string `json:"slug,omitempty"`
}

type ModuleOperationsAPIController

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

ModuleOperationsAPIController binds http requests to an api service and writes the service results to the http response

func (*ModuleOperationsAPIController) DeleteModule

DeleteModule - Delete module

func (*ModuleOperationsAPIController) DeprecateModule

func (c *ModuleOperationsAPIController) DeprecateModule(w http.ResponseWriter, r *http.Request)

DeprecateModule - Deprecate module

func (*ModuleOperationsAPIController) GetModule

GetModule - Fetch module

func (*ModuleOperationsAPIController) GetModules

GetModules - List modules

func (*ModuleOperationsAPIController) Routes

Routes returns all the api routes for the ModuleOperationsAPIController

type ModuleOperationsAPIOption

type ModuleOperationsAPIOption func(*ModuleOperationsAPIController)

ModuleOperationsAPIOption for how the controller is set up.

func WithModuleOperationsAPIErrorHandler

func WithModuleOperationsAPIErrorHandler(h ErrorHandler) ModuleOperationsAPIOption

WithModuleOperationsAPIErrorHandler inject ErrorHandler into controller

type ModuleOperationsAPIRouter

type ModuleOperationsAPIRouter interface {
	DeleteModule(http.ResponseWriter, *http.Request)
	DeprecateModule(http.ResponseWriter, *http.Request)
	GetModule(http.ResponseWriter, *http.Request)
	GetModules(http.ResponseWriter, *http.Request)
}

ModuleOperationsAPIRouter defines the required methods for binding the api requests to a responses for the ModuleOperationsAPI The ModuleOperationsAPIRouter implementation should parse necessary information from the http request, pass the data to a ModuleOperationsAPIServicer to perform the required actions, then write the service results to the http response.

type ModuleOperationsAPIService

type ModuleOperationsAPIService struct {
}

ModuleOperationsAPIService is a service that implements the logic for the ModuleOperationsAPIServicer This service should implement the business logic for every endpoint for the ModuleOperationsAPI API. Include any external packages or services that will be required by this service.

func (*ModuleOperationsAPIService) DeleteModule

func (s *ModuleOperationsAPIService) DeleteModule(ctx context.Context, moduleSlug string, reason string) (ImplResponse, error)

DeleteModule - Delete module

func (*ModuleOperationsAPIService) DeprecateModule

func (s *ModuleOperationsAPIService) DeprecateModule(ctx context.Context, moduleSlug string, deprecationRequest DeprecationRequest) (ImplResponse, error)

DeprecateModule - Deprecate module

func (*ModuleOperationsAPIService) GetModule

func (s *ModuleOperationsAPIService) GetModule(ctx context.Context, moduleSlug string, withHtml bool, includeFields []string, excludeFields []string, ifModifiedSince string) (ImplResponse, error)

GetModule - Fetch module

func (*ModuleOperationsAPIService) GetModules

func (s *ModuleOperationsAPIService) GetModules(ctx context.Context, limit int32, offset int32, sortBy string, query string, tag string, owner string, withTasks bool, withPlans bool, withPdk bool, premium bool, excludePremium bool, endorsements []string, operatingsystem string, operatingsystemrelease string, peRequirement string, puppetRequirement string, withMinimumScore int32, moduleGroups []string, showDeleted bool, hideDeprecated bool, onlyLatest bool, slugs []string, withHtml bool, includeFields []string, excludeFields []string, ifModifiedSince string, startsWith string, supported bool, withReleaseSince string) (ImplResponse, error)

GetModules - List modules

type ModuleOperationsAPIServicer

ModuleOperationsAPIServicer defines the api actions for the ModuleOperationsAPI service This interface intended to stay up to date with the openapi yaml used to generate it, while the service implementation can be ignored with the .openapi-generator-ignore file and updated with the logic required for the API.

func NewModuleOperationsAPIService

func NewModuleOperationsAPIService() ModuleOperationsAPIServicer

NewModuleOperationsAPIService creates a default api service

type ModuleOwner

type ModuleOwner struct {

	// Relative URL for this User resource
	Uri string `json:"uri,omitempty"`

	// Unique textual identifier for this User resource
	Slug string `json:"slug,omitempty"`

	// Username for this User resource
	Username string `json:"username,omitempty"`

	// Gravatar ID, learn more at [https://gravatar.com/]()
	GravatarId string `json:"gravatar_id,omitempty"`
}

type ModuleSupersededBy

type ModuleSupersededBy struct {

	// Relative URL for this Module resource
	Uri string `json:"uri,omitempty"`

	// Unique textual identifier for this Module resource
	Slug string `json:"slug,omitempty"`
}

type Number

type Number interface {
	~int32 | ~int64 | ~float32 | ~float64
}

type Operation

type Operation[T Number | string | bool] func(actual string) (T, bool, error)

func WithDefaultOrParse

func WithDefaultOrParse[T Number | string | bool](def T, parse ParseString[T]) Operation[T]

func WithParse

func WithParse[T Number | string | bool](parse ParseString[T]) Operation[T]

func WithRequire

func WithRequire[T Number | string | bool](parse ParseString[T]) Operation[T]

type Pagination

type Pagination struct {

	// Maximum number of results per page
	Limit int32 `json:"limit,omitempty"`

	// Current page's offset from the beginning of the result set
	Offset int32 `json:"offset,omitempty"`

	// Relative URL for the first page of the result set
	First string `json:"first,omitempty"`

	// Relative URL for the previous page of the result set, or `null` if this is the first page
	Previous *string `json:"previous,omitempty"`

	// Relative URL for the current page of the result set
	Current string `json:"current,omitempty"`

	// Relative URL for the next page of the result set, or `null` if this is the last page
	Next *string `json:"next,omitempty"`

	// Total number of all results
	Total int32 `json:"total,omitempty"`
}

type ParseString

type ParseString[T Number | string | bool] func(v string) (T, error)

type ParsingError

type ParsingError struct {
	Err error
}

ParsingError indicates that an error has occurred when parsing request parameters

func (*ParsingError) Error

func (e *ParsingError) Error() string

func (*ParsingError) Unwrap

func (e *ParsingError) Unwrap() error

type Release

type Release struct {

	// Relative URL for this Release resource
	Uri string `json:"uri,omitempty"`

	// Unique textual identifier for this Release resource
	Slug string `json:"slug,omitempty"`

	Module ReleaseModule `json:"module,omitempty"`

	Version string `json:"version,omitempty"`

	// Verbatim contents of release's `metadata.json` file
	Metadata map[string]interface{} `json:"metadata,omitempty"`

	// List of tags applied to this module release (derived from `metadata.json`)
	Tags []string `json:"tags,omitempty"`

	// Indicates whether or not this specific module release is supported, this value is no longer relevant, please see the `endorsement` property of the parent module instead
	// Deprecated
	Supported bool `json:"supported,omitempty"`

	// Indicates whether or not this module release's metadata contains [Puppet Development Kit](https://puppet.com/docs/pdk/latest/pdk.html) related keys/values
	Pdk bool `json:"pdk,omitempty"`

	// Numeric value representing module release's \"Quality score\", see [module scoring](https://forge.puppet.com/about/scoring) to learn more
	ValidationScore int32 `json:"validation_score,omitempty"`

	// Relative or absolute URL to download this release's tarball
	FileUri string `json:"file_uri,omitempty"`

	// Size of this release's tarball in bytes
	FileSize int32 `json:"file_size,omitempty"`

	// MD5 checksum for this release's tarball, can be used to verify successful download
	FileMd5 string `json:"file_md5,omitempty"`

	// SHA-256 checksum for this release's tarball, can be used to verify successful download
	FileSha256 string `json:"file_sha256,omitempty"`

	// Number of times this release has been downloaded through the Forge
	Downloads int32 `json:"downloads,omitempty"`

	// Contents of this release's README file, optionally converted to HTML format if possible (see `with_html` param)
	Readme string `json:"readme,omitempty"`

	// Contents of this release's CHANGELOG file, optionally converted to HTML format if possible (see `with_html` param)
	Changelog string `json:"changelog,omitempty"`

	// Contents of this release's LICENSE file, optionally converted to HTML format if possible (see `with_html` param)
	License string `json:"license,omitempty"`

	// Contents of this release's REFERENCE file, optionally converted to HTML format if possible (see `with_html` param)
	Reference string `json:"reference,omitempty"`

	// (OPTIONAL) Automatically generated documentation for custom Types included in this module release, see `reference` key instead (This field is not included in response by default, see `include_fields` param for more info)
	// Deprecated
	Docs map[string]interface{} `json:"docs,omitempty"`

	// (OPTIONAL) List of compatible PE versions for the release. This is calculated from the Puppet version requirement if one is provided in the module metadata. If a PE version but no Puppet version is provided, the PE version requirement will be returned. (This field is not included in response by default, see `include_fields` param for more info)
	PeCompatibility *[]string `json:"pe_compatibility,omitempty"`

	// Metadata for any Bolt tasks included in this module release
	Tasks []ReleaseTask `json:"tasks,omitempty"`

	// Links to metadata for Bolt plans included in this module release
	Plans []ReleasePlanAbbreviated `json:"plans,omitempty"`

	// Date and time this Release resource was created
	CreatedAt string `json:"created_at,omitempty"`

	// Date and time this Release resource was last updated
	UpdatedAt string `json:"updated_at,omitempty"`

	// Date and time this Release resource was marked as deleted
	DeletedAt *string `json:"deleted_at,omitempty"`

	// Author-provided reason that this module release was marked as deleted
	DeletedFor *string `json:"deleted_for,omitempty"`
}

type ReleaseAbbreviated

type ReleaseAbbreviated struct {

	// Relative URL for this Release resource
	Uri string `json:"uri,omitempty"`

	// Unique textual identifier for this Release resource
	Slug string `json:"slug,omitempty"`

	Version string `json:"version,omitempty"`

	// Indicates whether or not this specific module release is supported, this value is no longer relevant, please see the `endorsement` property of the parent module instead
	// Deprecated
	Supported bool `json:"supported,omitempty"`

	// Date and time this Release resource was created
	CreatedAt string `json:"created_at,omitempty"`

	// Date and time this Release resource was marked as deleted
	DeletedAt *string `json:"deleted_at,omitempty"`

	// Relative or absolute URL to download this release's tarball
	FileUri string `json:"file_uri,omitempty"`

	// Size of this release's tarball in bytes
	FileSize int32 `json:"file_size,omitempty"`
}

type ReleaseMinimal

type ReleaseMinimal struct {

	// Relative URL for this Release resource
	Uri string `json:"uri,omitempty"`

	// Unique textual identifier for this Release resource
	Slug string `json:"slug,omitempty"`

	// Relative or absolute URL to download this release's tarball
	FileUri string `json:"file_uri,omitempty"`
}

type ReleaseModule

type ReleaseModule struct {

	// Relative URL for this Module resource
	Uri string `json:"uri,omitempty"`

	// Unique textual identifier for this Module resource
	Slug string `json:"slug,omitempty"`

	// Base name of this module (without username/namespace)
	Name string `json:"name,omitempty"`

	// Date and time this Module resource was marked as deprecated by the owner
	DeprecatedAt *string `json:"deprecated_at,omitempty"`

	Owner ModuleOwner `json:"owner,omitempty"`
}

type ReleaseOperationsAPIController

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

ReleaseOperationsAPIController binds http requests to an api service and writes the service results to the http response

func (*ReleaseOperationsAPIController) AddRelease

AddRelease - Create module release

func (*ReleaseOperationsAPIController) DeleteRelease

DeleteRelease - Delete module release

func (*ReleaseOperationsAPIController) GetFile

GetFile - Download module release

func (*ReleaseOperationsAPIController) GetRelease

GetRelease - Fetch module release

func (*ReleaseOperationsAPIController) GetReleasePlan

GetReleasePlan - Fetch module release plan

func (*ReleaseOperationsAPIController) GetReleasePlans

GetReleasePlans - List module release plans

func (*ReleaseOperationsAPIController) GetReleases

GetReleases - List module releases

func (*ReleaseOperationsAPIController) Routes

Routes returns all the api routes for the ReleaseOperationsAPIController

type ReleaseOperationsAPIOption

type ReleaseOperationsAPIOption func(*ReleaseOperationsAPIController)

ReleaseOperationsAPIOption for how the controller is set up.

func WithReleaseOperationsAPIErrorHandler

func WithReleaseOperationsAPIErrorHandler(h ErrorHandler) ReleaseOperationsAPIOption

WithReleaseOperationsAPIErrorHandler inject ErrorHandler into controller

type ReleaseOperationsAPIRouter

type ReleaseOperationsAPIRouter interface {
	AddRelease(http.ResponseWriter, *http.Request)
	DeleteRelease(http.ResponseWriter, *http.Request)
	GetFile(http.ResponseWriter, *http.Request)
	GetRelease(http.ResponseWriter, *http.Request)
	GetReleasePlan(http.ResponseWriter, *http.Request)
	GetReleasePlans(http.ResponseWriter, *http.Request)
	GetReleases(http.ResponseWriter, *http.Request)
}

ReleaseOperationsAPIRouter defines the required methods for binding the api requests to a responses for the ReleaseOperationsAPI The ReleaseOperationsAPIRouter implementation should parse necessary information from the http request, pass the data to a ReleaseOperationsAPIServicer to perform the required actions, then write the service results to the http response.

type ReleaseOperationsAPIService

type ReleaseOperationsAPIService struct {
}

ReleaseOperationsAPIService is a service that implements the logic for the ReleaseOperationsAPIServicer This service should implement the business logic for every endpoint for the ReleaseOperationsAPI API. Include any external packages or services that will be required by this service.

func (*ReleaseOperationsAPIService) AddRelease

func (s *ReleaseOperationsAPIService) AddRelease(ctx context.Context, addReleaseRequest AddReleaseRequest) (ImplResponse, error)

AddRelease - Create module release

func (*ReleaseOperationsAPIService) DeleteRelease

func (s *ReleaseOperationsAPIService) DeleteRelease(ctx context.Context, releaseSlug string, reason string) (ImplResponse, error)

DeleteRelease - Delete module release

func (*ReleaseOperationsAPIService) GetFile

func (s *ReleaseOperationsAPIService) GetFile(ctx context.Context, filename string) (ImplResponse, error)

GetFile - Download module release

func (*ReleaseOperationsAPIService) GetRelease

func (s *ReleaseOperationsAPIService) GetRelease(ctx context.Context, releaseSlug string, withHtml bool, includeFields []string, excludeFields []string, ifModifiedSince string) (ImplResponse, error)

GetRelease - Fetch module release

func (*ReleaseOperationsAPIService) GetReleasePlan

func (s *ReleaseOperationsAPIService) GetReleasePlan(ctx context.Context, releaseSlug string, planName string) (ImplResponse, error)

GetReleasePlan - Fetch module release plan

func (*ReleaseOperationsAPIService) GetReleasePlans

func (s *ReleaseOperationsAPIService) GetReleasePlans(ctx context.Context, releaseSlug string) (ImplResponse, error)

GetReleasePlans - List module release plans

func (*ReleaseOperationsAPIService) GetReleases

func (s *ReleaseOperationsAPIService) GetReleases(ctx context.Context, limit int32, offset int32, sortBy string, module string, owner string, withPdk bool, operatingsystem string, operatingsystemrelease string, peRequirement string, puppetRequirement string, moduleGroups []string, showDeleted bool, hideDeprecated bool, withHtml bool, includeFields []string, excludeFields []string, ifModifiedSince string, supported bool) (ImplResponse, error)

GetReleases - List module releases

type ReleaseOperationsAPIServicer

ReleaseOperationsAPIServicer defines the api actions for the ReleaseOperationsAPI service This interface intended to stay up to date with the openapi yaml used to generate it, while the service implementation can be ignored with the .openapi-generator-ignore file and updated with the logic required for the API.

func NewReleaseOperationsAPIService

func NewReleaseOperationsAPIService() ReleaseOperationsAPIServicer

NewReleaseOperationsAPIService creates a default api service

type ReleasePlan

type ReleasePlan struct {

	// Relative URL for this Plan resource
	Uri string `json:"uri,omitempty"`

	// The name of the plan, including the module name
	Name string `json:"name,omitempty"`

	// Path to this Plan within the module's file structure
	Filename string `json:"filename,omitempty"`

	PlanMetadata ReleasePlanPlanMetadata `json:"plan_metadata,omitempty"`

	// Whether this plan is private
	Private bool `json:"private,omitempty"`
}

type ReleasePlanAbbreviated

type ReleasePlanAbbreviated struct {

	// URL path to the full metadata for this plan
	Uri string `json:"uri,omitempty"`

	// The name of the plan, including the module name
	Name string `json:"name,omitempty"`

	// Whether this plan is private
	Private bool `json:"private,omitempty"`
}

type ReleasePlanPlanMetadata

type ReleasePlanPlanMetadata struct {

	// the name of the plan, including the module name
	Name string `json:"name,omitempty"`

	// Path to this plan within the module's file structure
	File string `json:"file,omitempty"`

	// The line within the plan source file where the plan code starts
	Line int32 `json:"line,omitempty"`

	// Whether this plan is private
	Private bool `json:"private,omitempty"`

	// Full text of the plan source file
	Source string `json:"source,omitempty"`

	// Default values for the plan's arguments: keys are argument names, and values are their defaults
	Defaults map[string]interface{} `json:"defaults,omitempty"`

	Docstring ReleasePlanPlanMetadataDocstring `json:"docstring,omitempty"`
}

type ReleasePlanPlanMetadataDocstring

type ReleasePlanPlanMetadataDocstring struct {

	// Generated docstrings for any YARD tags (like @param, for example)
	Tags []ReleasePlanPlanMetadataDocstringTagsInner `json:"tags,omitempty"`

	// Contains any free-form YARD comment text outside of tags
	Text string `json:"text,omitempty"`
}

ReleasePlanPlanMetadataDocstring - Raw doc objects for this plan generated by puppet-strings (YARD) docstring comments in the plan source

type ReleasePlanPlanMetadataDocstringTagsInner

type ReleasePlanPlanMetadataDocstringTagsInner struct {

	// The name specified by this YARD tag
	Name string `json:"name,omitempty"`

	// The description text specified by this YARD tag
	Text string `json:"text,omitempty"`

	// Valid types specified by this YARD tag
	Types []string `json:"types,omitempty"`

	// The name of the YARD tag itself
	TagName string `json:"tag_name,omitempty"`
}

ReleasePlanPlanMetadataDocstringTagsInner - Generated docstring for a specific YARD tag (like @param, for example)

type ReleaseTask

type ReleaseTask struct {

	// Name for this task
	Name string `json:"name,omitempty"`

	// Executable for this task (deprecated, superseded by \"executables\")
	// Deprecated
	Executable string `json:"executable,omitempty"`

	// Array of executable name(s) for all implementations of this task
	Executables []string `json:"executables,omitempty"`

	// Description for this task
	Description string `json:"description,omitempty"`

	// JSON metadata for this task, see [writing tasks](https://puppet.com/docs/bolt/latest/writing_tasks.html) documentation for more info
	Metadata map[string]interface{} `json:"metadata,omitempty"`
}

type RequiredError

type RequiredError struct {
	Field string
}

RequiredError indicates that an error has occurred when parsing request parameters

func (*RequiredError) Error

func (e *RequiredError) Error() string

type Route

type Route struct {
	Method      string
	Pattern     string
	HandlerFunc http.HandlerFunc
}

A Route defines the parameters for an api endpoint

type Router

type Router interface {
	Routes() Routes
}

Router defines the required methods for retrieving api routes

func NewModuleOperationsAPIController

func NewModuleOperationsAPIController(s ModuleOperationsAPIServicer, opts ...ModuleOperationsAPIOption) Router

NewModuleOperationsAPIController creates a default api controller

func NewReleaseOperationsAPIController

func NewReleaseOperationsAPIController(s ReleaseOperationsAPIServicer, opts ...ReleaseOperationsAPIOption) Router

NewReleaseOperationsAPIController creates a default api controller

func NewSearchFilterOperationsAPIController

func NewSearchFilterOperationsAPIController(s SearchFilterOperationsAPIServicer, opts ...SearchFilterOperationsAPIOption) Router

NewSearchFilterOperationsAPIController creates a default api controller

func NewUserOperationsAPIController

func NewUserOperationsAPIController(s UserOperationsAPIServicer, opts ...UserOperationsAPIOption) Router

NewUserOperationsAPIController creates a default api controller

type Routes

type Routes map[string]Route

Routes is a map of defined api endpoints

type SearchFilter

type SearchFilter struct {

	// The unique identifier for the search filter.
	Id int32 `json:"id,omitempty"`

	// The hash definining the search filter criteria.
	Filter map[string]interface{} `json:"filter,omitempty"`

	// Indicates whether the search filter is active.
	Active bool `json:"active,omitempty"`

	// The timestamp indicating when the search filter was created.
	CreatedAt string `json:"created_at,omitempty"`
}

type SearchFilterOperationsAPIController

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

SearchFilterOperationsAPIController binds http requests to an api service and writes the service results to the http response

func (*SearchFilterOperationsAPIController) AddSearchFilter

AddSearchFilter - Create search filter

func (*SearchFilterOperationsAPIController) DeleteUserSearchFilter

func (c *SearchFilterOperationsAPIController) DeleteUserSearchFilter(w http.ResponseWriter, r *http.Request)

DeleteUserSearchFilter - Delete search filter by ID

func (*SearchFilterOperationsAPIController) GetUserSearchFilters

func (c *SearchFilterOperationsAPIController) GetUserSearchFilters(w http.ResponseWriter, r *http.Request)

GetUserSearchFilters - Get user's search filters

func (*SearchFilterOperationsAPIController) Routes

Routes returns all the api routes for the SearchFilterOperationsAPIController

type SearchFilterOperationsAPIOption

type SearchFilterOperationsAPIOption func(*SearchFilterOperationsAPIController)

SearchFilterOperationsAPIOption for how the controller is set up.

func WithSearchFilterOperationsAPIErrorHandler

func WithSearchFilterOperationsAPIErrorHandler(h ErrorHandler) SearchFilterOperationsAPIOption

WithSearchFilterOperationsAPIErrorHandler inject ErrorHandler into controller

type SearchFilterOperationsAPIRouter

type SearchFilterOperationsAPIRouter interface {
	AddSearchFilter(http.ResponseWriter, *http.Request)
	DeleteUserSearchFilter(http.ResponseWriter, *http.Request)
	GetUserSearchFilters(http.ResponseWriter, *http.Request)
}

SearchFilterOperationsAPIRouter defines the required methods for binding the api requests to a responses for the SearchFilterOperationsAPI The SearchFilterOperationsAPIRouter implementation should parse necessary information from the http request, pass the data to a SearchFilterOperationsAPIServicer to perform the required actions, then write the service results to the http response.

type SearchFilterOperationsAPIService

type SearchFilterOperationsAPIService struct {
}

SearchFilterOperationsAPIService is a service that implements the logic for the SearchFilterOperationsAPIServicer This service should implement the business logic for every endpoint for the SearchFilterOperationsAPI API. Include any external packages or services that will be required by this service.

func (*SearchFilterOperationsAPIService) AddSearchFilter

func (s *SearchFilterOperationsAPIService) AddSearchFilter(ctx context.Context, searchFilterSlug string, withHtml bool, includeFields []string, excludeFields []string, ifModifiedSince string) (ImplResponse, error)

AddSearchFilter - Create search filter

func (*SearchFilterOperationsAPIService) DeleteUserSearchFilter

func (s *SearchFilterOperationsAPIService) DeleteUserSearchFilter(ctx context.Context, id int32) (ImplResponse, error)

DeleteUserSearchFilter - Delete search filter by ID

func (*SearchFilterOperationsAPIService) GetUserSearchFilters

func (s *SearchFilterOperationsAPIService) GetUserSearchFilters(ctx context.Context) (ImplResponse, error)

GetUserSearchFilters - Get user's search filters

type SearchFilterOperationsAPIServicer

type SearchFilterOperationsAPIServicer interface {
	AddSearchFilter(context.Context, string, bool, []string, []string, string) (ImplResponse, error)
	DeleteUserSearchFilter(context.Context, int32) (ImplResponse, error)
	GetUserSearchFilters(context.Context) (ImplResponse, error)
}

SearchFilterOperationsAPIServicer defines the api actions for the SearchFilterOperationsAPI service This interface intended to stay up to date with the openapi yaml used to generate it, while the service implementation can be ignored with the .openapi-generator-ignore file and updated with the logic required for the API.

func NewSearchFilterOperationsAPIService

func NewSearchFilterOperationsAPIService() SearchFilterOperationsAPIServicer

NewSearchFilterOperationsAPIService creates a default api service

type SearchFilterResponse

type SearchFilterResponse struct {

	// The array of user search filter.
	UserSearchFilters []SearchFilter `json:"user_search_filters,omitempty"`
}

type User

type User struct {

	// Relative URL for this User resource
	Uri string `json:"uri,omitempty"`

	// Unique textual identifier for this User resource
	Slug string `json:"slug,omitempty"`

	// Gravatar ID, learn more at [https://gravatar.com/]()
	GravatarId string `json:"gravatar_id,omitempty"`

	// Username for this User resource
	Username string `json:"username,omitempty"`

	// Free form display name for this User resource
	DisplayName string `json:"display_name,omitempty"`

	// Total number of module releases (versions) published under this User
	ReleaseCount int32 `json:"release_count,omitempty"`

	// Total number of unique modules published under this User
	ModuleCount int32 `json:"module_count,omitempty"`

	// Date and time this User resource was created
	CreatedAt string `json:"created_at,omitempty"`

	// Date and time this User resource was last modified
	UpdatedAt string `json:"updated_at,omitempty"`
}

type UserAbbreviated

type UserAbbreviated struct {

	// Relative URL for this User resource
	Uri string `json:"uri,omitempty"`

	// Unique textual identifier for this User resource
	Slug string `json:"slug,omitempty"`

	// Username for this User resource
	Username string `json:"username,omitempty"`

	// Gravatar ID, learn more at [https://gravatar.com/]()
	GravatarId string `json:"gravatar_id,omitempty"`
}

type UserOperationsAPIController

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

UserOperationsAPIController binds http requests to an api service and writes the service results to the http response

func (*UserOperationsAPIController) GetUser

GetUser - Fetch user

func (*UserOperationsAPIController) GetUsers

GetUsers - List users

func (*UserOperationsAPIController) Routes

func (c *UserOperationsAPIController) Routes() Routes

Routes returns all the api routes for the UserOperationsAPIController

type UserOperationsAPIOption

type UserOperationsAPIOption func(*UserOperationsAPIController)

UserOperationsAPIOption for how the controller is set up.

func WithUserOperationsAPIErrorHandler

func WithUserOperationsAPIErrorHandler(h ErrorHandler) UserOperationsAPIOption

WithUserOperationsAPIErrorHandler inject ErrorHandler into controller

type UserOperationsAPIRouter

type UserOperationsAPIRouter interface {
	GetUser(http.ResponseWriter, *http.Request)
	GetUsers(http.ResponseWriter, *http.Request)
}

UserOperationsAPIRouter defines the required methods for binding the api requests to a responses for the UserOperationsAPI The UserOperationsAPIRouter implementation should parse necessary information from the http request, pass the data to a UserOperationsAPIServicer to perform the required actions, then write the service results to the http response.

type UserOperationsAPIService

type UserOperationsAPIService struct {
}

UserOperationsAPIService is a service that implements the logic for the UserOperationsAPIServicer This service should implement the business logic for every endpoint for the UserOperationsAPI API. Include any external packages or services that will be required by this service.

func (*UserOperationsAPIService) GetUser

func (s *UserOperationsAPIService) GetUser(ctx context.Context, userSlug string, withHtml bool, includeFields []string, excludeFields []string, ifModifiedSince string) (ImplResponse, error)

GetUser - Fetch user

func (*UserOperationsAPIService) GetUsers

func (s *UserOperationsAPIService) GetUsers(ctx context.Context, limit int32, offset int32, sortBy string, withHtml bool, includeFields []string, excludeFields []string, ifModifiedSince string) (ImplResponse, error)

GetUsers - List users

type UserOperationsAPIServicer

type UserOperationsAPIServicer interface {
	GetUser(context.Context, string, bool, []string, []string, string) (ImplResponse, error)
	GetUsers(context.Context, int32, int32, string, bool, []string, []string, string) (ImplResponse, error)
}

UserOperationsAPIServicer defines the api actions for the UserOperationsAPI service This interface intended to stay up to date with the openapi yaml used to generate it, while the service implementation can be ignored with the .openapi-generator-ignore file and updated with the logic required for the API.

func NewUserOperationsAPIService

func NewUserOperationsAPIService() UserOperationsAPIServicer

NewUserOperationsAPIService creates a default api service

Source Files

Jump to

Keyboard shortcuts

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