server

package
v0.0.0-...-8a644c6 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

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

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.5.1 DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handler

func Handler(si ServerInterface) http.Handler

Handler creates http.Handler with routing matching OpenAPI spec.

func HandlerFromMux

func HandlerFromMux(si ServerInterface, r chi.Router) http.Handler

HandlerFromMux creates http.Handler with routing matching OpenAPI spec based on the provided mux.

func HandlerFromMuxWithBaseURL

func HandlerFromMuxWithBaseURL(si ServerInterface, r chi.Router, baseURL string) http.Handler

func HandlerWithOptions

func HandlerWithOptions(si ServerInterface, options ChiServerOptions) http.Handler

HandlerWithOptions creates http.Handler with additional options

Types

type AlreadyExists

type AlreadyExists = Error

AlreadyExists Error response following RFC 7807 Problem Details and AEP-193.

Provides structured error information for API failures.

type AlreadyExistsJSONResponse

type AlreadyExistsJSONResponse Error

type BadRequest

type BadRequest = Error

BadRequest Error response following RFC 7807 Problem Details and AEP-193.

Provides structured error information for API failures.

type BadRequestJSONResponse

type BadRequestJSONResponse Error

type ChiServerOptions

type ChiServerOptions struct {
	BaseURL          string
	BaseRouter       chi.Router
	Middlewares      []MiddlewareFunc
	ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}

type CreatePolicy201JSONResponse

type CreatePolicy201JSONResponse struct {
	Body    Policy
	Headers CreatePolicy201ResponseHeaders
}

func (CreatePolicy201JSONResponse) VisitCreatePolicyResponse

func (response CreatePolicy201JSONResponse) VisitCreatePolicyResponse(w http.ResponseWriter) error

type CreatePolicy201ResponseHeaders

type CreatePolicy201ResponseHeaders struct {
	Location string
}

type CreatePolicy400JSONResponse

type CreatePolicy400JSONResponse struct{ BadRequestJSONResponse }

func (CreatePolicy400JSONResponse) VisitCreatePolicyResponse

func (response CreatePolicy400JSONResponse) VisitCreatePolicyResponse(w http.ResponseWriter) error

type CreatePolicy401JSONResponse

type CreatePolicy401JSONResponse struct{ UnauthorizedJSONResponse }

func (CreatePolicy401JSONResponse) VisitCreatePolicyResponse

func (response CreatePolicy401JSONResponse) VisitCreatePolicyResponse(w http.ResponseWriter) error

type CreatePolicy403JSONResponse

type CreatePolicy403JSONResponse struct{ ForbiddenJSONResponse }

func (CreatePolicy403JSONResponse) VisitCreatePolicyResponse

func (response CreatePolicy403JSONResponse) VisitCreatePolicyResponse(w http.ResponseWriter) error

type CreatePolicy409JSONResponse

type CreatePolicy409JSONResponse struct{ AlreadyExistsJSONResponse }

func (CreatePolicy409JSONResponse) VisitCreatePolicyResponse

func (response CreatePolicy409JSONResponse) VisitCreatePolicyResponse(w http.ResponseWriter) error

type CreatePolicy422JSONResponse

type CreatePolicy422JSONResponse struct{ ValidationErrorJSONResponse }

func (CreatePolicy422JSONResponse) VisitCreatePolicyResponse

func (response CreatePolicy422JSONResponse) VisitCreatePolicyResponse(w http.ResponseWriter) error

type CreatePolicy500JSONResponse

type CreatePolicy500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (CreatePolicy500JSONResponse) VisitCreatePolicyResponse

func (response CreatePolicy500JSONResponse) VisitCreatePolicyResponse(w http.ResponseWriter) error

type CreatePolicyJSONRequestBody

type CreatePolicyJSONRequestBody = Policy

CreatePolicyJSONRequestBody defines body for CreatePolicy for application/json ContentType.

type CreatePolicyParams

type CreatePolicyParams struct {
	// Id Optional client-specified ID for the policy. If not provided, the
	// server will generate a UUID.
	//
	// Requirements (per AEP-122):
	// - 1-63 characters long
	// - Start with lowercase letter
	// - Contain only lowercase letters, numbers, and hyphens
	// - End with letter or number
	Id *string `form:"id,omitempty" json:"id,omitempty"`
}

CreatePolicyParams defines parameters for CreatePolicy.

type CreatePolicyRequestObject

type CreatePolicyRequestObject struct {
	Params CreatePolicyParams
	Body   *CreatePolicyJSONRequestBody
}

type CreatePolicyResponseObject

type CreatePolicyResponseObject interface {
	VisitCreatePolicyResponse(w http.ResponseWriter) error
}

type DeletePolicy204Response

type DeletePolicy204Response struct {
}

func (DeletePolicy204Response) VisitDeletePolicyResponse

func (response DeletePolicy204Response) VisitDeletePolicyResponse(w http.ResponseWriter) error

type DeletePolicy401JSONResponse

type DeletePolicy401JSONResponse struct{ UnauthorizedJSONResponse }

func (DeletePolicy401JSONResponse) VisitDeletePolicyResponse

func (response DeletePolicy401JSONResponse) VisitDeletePolicyResponse(w http.ResponseWriter) error

type DeletePolicy403JSONResponse

type DeletePolicy403JSONResponse struct{ ForbiddenJSONResponse }

func (DeletePolicy403JSONResponse) VisitDeletePolicyResponse

func (response DeletePolicy403JSONResponse) VisitDeletePolicyResponse(w http.ResponseWriter) error

type DeletePolicy404JSONResponse

type DeletePolicy404JSONResponse struct{ NotFoundJSONResponse }

func (DeletePolicy404JSONResponse) VisitDeletePolicyResponse

func (response DeletePolicy404JSONResponse) VisitDeletePolicyResponse(w http.ResponseWriter) error

type DeletePolicy500JSONResponse

type DeletePolicy500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (DeletePolicy500JSONResponse) VisitDeletePolicyResponse

func (response DeletePolicy500JSONResponse) VisitDeletePolicyResponse(w http.ResponseWriter) error

type DeletePolicyRequestObject

type DeletePolicyRequestObject struct {
	PolicyId PolicyIdPath `json:"policyId"`
}

type DeletePolicyResponseObject

type DeletePolicyResponseObject interface {
	VisitDeletePolicyResponse(w http.ResponseWriter) error
}

type Error

type Error struct {
	// Detail Human-readable explanation specific to this occurrence of the problem.
	// Should provide actionable information for developers.
	Detail *string `json:"detail,omitempty"`

	// Instance Unique identifier for this specific error occurrence. Useful for
	// tracking and debugging.
	Instance *string `json:"instance,omitempty"`

	// Status HTTP status code
	Status int32 `json:"status"`

	// Title Human-readable summary of the problem type
	Title string `json:"title"`

	// Type URI reference identifying the problem type. This is the canonical
	// error code.
	Type ErrorType `json:"type"`
}

Error Error response following RFC 7807 Problem Details and AEP-193.

Provides structured error information for API failures.

type ErrorType

type ErrorType string

ErrorType URI reference identifying the problem type. This is the canonical error code.

const (
	ABORTED            ErrorType = "ABORTED"
	ALREADYEXISTS      ErrorType = "ALREADY_EXISTS"
	DEADLINEEXCEEDED   ErrorType = "DEADLINE_EXCEEDED"
	FAILEDPRECONDITION ErrorType = "FAILED_PRECONDITION"
	INTERNAL           ErrorType = "INTERNAL"
	INVALIDARGUMENT    ErrorType = "INVALID_ARGUMENT"
	NOTFOUND           ErrorType = "NOT_FOUND"
	OUTOFRANGE         ErrorType = "OUT_OF_RANGE"
	PERMISSIONDENIED   ErrorType = "PERMISSION_DENIED"
	RESOURCEEXHAUSTED  ErrorType = "RESOURCE_EXHAUSTED"
	UNAUTHENTICATED    ErrorType = "UNAUTHENTICATED"
	UNAVAILABLE        ErrorType = "UNAVAILABLE"
	UNIMPLEMENTED      ErrorType = "UNIMPLEMENTED"
)

Defines values for ErrorType.

type Forbidden

type Forbidden = Error

Forbidden Error response following RFC 7807 Problem Details and AEP-193.

Provides structured error information for API failures.

type ForbiddenJSONResponse

type ForbiddenJSONResponse Error

type GetHealth200JSONResponse

type GetHealth200JSONResponse Health

func (GetHealth200JSONResponse) VisitGetHealthResponse

func (response GetHealth200JSONResponse) VisitGetHealthResponse(w http.ResponseWriter) error

type GetHealthRequestObject

type GetHealthRequestObject struct {
}

type GetHealthResponseObject

type GetHealthResponseObject interface {
	VisitGetHealthResponse(w http.ResponseWriter) error
}

type GetPolicy200JSONResponse

type GetPolicy200JSONResponse Policy

func (GetPolicy200JSONResponse) VisitGetPolicyResponse

func (response GetPolicy200JSONResponse) VisitGetPolicyResponse(w http.ResponseWriter) error

type GetPolicy401JSONResponse

type GetPolicy401JSONResponse struct{ UnauthorizedJSONResponse }

func (GetPolicy401JSONResponse) VisitGetPolicyResponse

func (response GetPolicy401JSONResponse) VisitGetPolicyResponse(w http.ResponseWriter) error

type GetPolicy403JSONResponse

type GetPolicy403JSONResponse struct{ ForbiddenJSONResponse }

func (GetPolicy403JSONResponse) VisitGetPolicyResponse

func (response GetPolicy403JSONResponse) VisitGetPolicyResponse(w http.ResponseWriter) error

type GetPolicy404JSONResponse

type GetPolicy404JSONResponse struct{ NotFoundJSONResponse }

func (GetPolicy404JSONResponse) VisitGetPolicyResponse

func (response GetPolicy404JSONResponse) VisitGetPolicyResponse(w http.ResponseWriter) error

type GetPolicy500JSONResponse

type GetPolicy500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (GetPolicy500JSONResponse) VisitGetPolicyResponse

func (response GetPolicy500JSONResponse) VisitGetPolicyResponse(w http.ResponseWriter) error

type GetPolicyRequestObject

type GetPolicyRequestObject struct {
	PolicyId PolicyIdPath `json:"policyId"`
}

type GetPolicyResponseObject

type GetPolicyResponseObject interface {
	VisitGetPolicyResponse(w http.ResponseWriter) error
}

type Health

type Health struct {
	// Path Canonical path of the resource
	Path *string `json:"path,omitempty"`

	// Status Health status
	Status string `json:"status"`
}

Health defines model for Health.

type InternalServerError

type InternalServerError = Error

InternalServerError Error response following RFC 7807 Problem Details and AEP-193.

Provides structured error information for API failures.

type InternalServerErrorJSONResponse

type InternalServerErrorJSONResponse Error

type InvalidParamFormatError

type InvalidParamFormatError struct {
	ParamName string
	Err       error
}

func (*InvalidParamFormatError) Error

func (e *InvalidParamFormatError) Error() string

func (*InvalidParamFormatError) Unwrap

func (e *InvalidParamFormatError) Unwrap() error

type ListPolicies200JSONResponse

type ListPolicies200JSONResponse PolicyList

func (ListPolicies200JSONResponse) VisitListPoliciesResponse

func (response ListPolicies200JSONResponse) VisitListPoliciesResponse(w http.ResponseWriter) error

type ListPolicies400JSONResponse

type ListPolicies400JSONResponse struct{ BadRequestJSONResponse }

func (ListPolicies400JSONResponse) VisitListPoliciesResponse

func (response ListPolicies400JSONResponse) VisitListPoliciesResponse(w http.ResponseWriter) error

type ListPolicies401JSONResponse

type ListPolicies401JSONResponse struct{ UnauthorizedJSONResponse }

func (ListPolicies401JSONResponse) VisitListPoliciesResponse

func (response ListPolicies401JSONResponse) VisitListPoliciesResponse(w http.ResponseWriter) error

type ListPolicies403JSONResponse

type ListPolicies403JSONResponse struct{ ForbiddenJSONResponse }

func (ListPolicies403JSONResponse) VisitListPoliciesResponse

func (response ListPolicies403JSONResponse) VisitListPoliciesResponse(w http.ResponseWriter) error

type ListPolicies500JSONResponse

type ListPolicies500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (ListPolicies500JSONResponse) VisitListPoliciesResponse

func (response ListPolicies500JSONResponse) VisitListPoliciesResponse(w http.ResponseWriter) error

type ListPoliciesParams

type ListPoliciesParams struct {
	// PageToken Token for retrieving the next page of results. Leave empty for
	// the first page. Use the `next_page_token` from the previous
	// response to get the next page.
	PageToken *string `form:"page_token,omitempty" json:"page_token,omitempty"`

	// MaxPageSize Maximum number of policies to return per page. Server may return
	// fewer results. If unspecified, defaults to 50. Maximum value is 1000.
	MaxPageSize *int32 `form:"max_page_size,omitempty" json:"max_page_size,omitempty"`

	// Filter Filter expression to apply to the list. Supports filtering by:
	// - `policy_type`: GLOBAL or USER
	// - `enabled`: true or false
	//
	// Examples:
	// - `policy_type='GLOBAL'`
	// - `enabled=true`
	// - `policy_type='GLOBAL' AND enabled=true`
	Filter *string `form:"filter,omitempty" json:"filter,omitempty"`

	// OrderBy Comma-separated list of fields to order by. Each field can be
	// followed by 'asc' or 'desc'. Defaults to 'priority asc'.
	//
	// Supported fields:
	// - priority
	// - display_name
	// - create_time
	//
	// Examples:
	// - `priority asc`
	// - `display_name desc`
	// - `create_time desc,priority asc`
	OrderBy *string `form:"order_by,omitempty" json:"order_by,omitempty"`
}

ListPoliciesParams defines parameters for ListPolicies.

type ListPoliciesRequestObject

type ListPoliciesRequestObject struct {
	Params ListPoliciesParams
}

type ListPoliciesResponseObject

type ListPoliciesResponseObject interface {
	VisitListPoliciesResponse(w http.ResponseWriter) error
}

type MiddlewareFunc

type MiddlewareFunc func(http.Handler) http.Handler

type NotFound

type NotFound = Error

NotFound Error response following RFC 7807 Problem Details and AEP-193.

Provides structured error information for API failures.

type NotFoundJSONResponse

type NotFoundJSONResponse Error

type Policy

type Policy struct {
	// CreateTime Timestamp when the policy was created. This field is output-only
	// and automatically set by the server.
	//
	// Uses ISO 8601 format with timezone per AEP-140.
	CreateTime *time.Time `json:"create_time,omitempty"`

	// Description Optional detailed description of the policy's purpose and behavior.
	// Supports markdown formatting.
	Description *string `json:"description,omitempty"`

	// DisplayName Human-readable name for the policy. This is typically shown in
	// user interfaces and should be descriptive.
	DisplayName *string `json:"display_name,omitempty"`

	// Enabled Whether the policy is currently active. Disabled policies are not
	// evaluated during authorization decisions.
	Enabled *bool `json:"enabled,omitempty"`

	// Id Unique identifier for the policy. This field is output-only and
	// immutable after creation. The ID can be optionally specified via
	// query parameter on creation; if not provided, the server generates a UUID.
	//
	// Follows AEP-122 resource ID conventions.
	Id *string `json:"id,omitempty"`

	// LabelSelector Key-value pairs used to match this policy against incoming requests.
	// The policy is evaluated only if all labels match the request context.
	// If no label selector is provided, the policy is evaluated for all requests.
	//
	// Common label keys:
	// - environment: production, staging, development
	// - user_id: user identifier
	// - service: service name
	// - region: geographical region
	// - tier: service tier (critical, standard, etc.)
	LabelSelector *map[string]string `json:"label_selector,omitempty"`

	// Path Resource path in the format "policies/{policyId}".
	// This field is output-only and set by the server.
	//
	// Follows AEP-122 resource path conventions.
	Path *string `json:"path,omitempty"`

	// PolicyType Scope of the policy application. This field is immutable after creation.
	//
	// - GLOBAL: Applies to all requests across the system
	// - USER: Applies to requests for a specific user
	//
	// Policies are evaluated in hierarchical order: Global -> User
	PolicyType *PolicyPolicyType `json:"policy_type,omitempty"`

	// Priority Priority value for policy evaluation order. Lower numbers have
	// higher priority and are evaluated first.
	//
	// Valid range: 1-1000
	// - 1-100: Critical/system policies
	// - 101-500: Standard policies
	// - 501-1000: Low-priority policies
	Priority *int32 `json:"priority,omitempty"`

	// RegoCode The OPA Rego policy code. This code is executed when the policy
	// is evaluated. Must be valid Rego syntax.
	//
	// The code should define a package and decision rules. Common patterns:
	// - Define a default allow/deny
	// - Implement conditional logic based on input
	// - Reference data from the policy engine
	//
	// The Rego code is validated on create and update operations.
	RegoCode *string `json:"rego_code,omitempty"`

	// UpdateTime Timestamp when the policy was last updated. This field is output-only
	// and automatically updated by the server on any modification.
	//
	// Uses ISO 8601 format with timezone per AEP-140.
	UpdateTime *time.Time `json:"update_time,omitempty"`
}

Policy Represents an OPA (Open Policy Agent) policy resource.

Policies define authorization rules using Rego code and can be scoped to different levels (GLOBAL or USER). They are matched against requests using label selectors and evaluated in priority order.

Used for both create (POST) and update (PATCH). On create, display_name, policy_type, and rego_code are required (enforced by the service). On update, only fields present in the request body are merged (RFC 7396).

type PolicyIdPath

type PolicyIdPath = string

PolicyIdPath defines model for PolicyIdPath.

type PolicyList

type PolicyList struct {
	// NextPageToken Token for retrieving the next page of results. If empty or not
	// present, there are no more results.
	//
	// This token is opaque and should not be parsed by clients.
	NextPageToken *string `json:"next_page_token,omitempty"`

	// Policies List of policy resources matching the request criteria
	Policies []Policy `json:"policies"`
}

PolicyList Response message for listing policies.

Implements AEP-132 List standard method requirements.

type PolicyPolicyType

type PolicyPolicyType string

PolicyPolicyType Scope of the policy application. This field is immutable after creation.

- GLOBAL: Applies to all requests across the system - USER: Applies to requests for a specific user

Policies are evaluated in hierarchical order: Global -> User

const (
	GLOBAL PolicyPolicyType = "GLOBAL"
	USER   PolicyPolicyType = "USER"
)

Defines values for PolicyPolicyType.

type RequiredHeaderError

type RequiredHeaderError struct {
	ParamName string
	Err       error
}

func (*RequiredHeaderError) Error

func (e *RequiredHeaderError) Error() string

func (*RequiredHeaderError) Unwrap

func (e *RequiredHeaderError) Unwrap() error

type RequiredParamError

type RequiredParamError struct {
	ParamName string
}

func (*RequiredParamError) Error

func (e *RequiredParamError) Error() string

type ServerInterface

type ServerInterface interface {
	// Health check
	// (GET /health)
	GetHealth(w http.ResponseWriter, r *http.Request)
	// List policies
	// (GET /policies)
	ListPolicies(w http.ResponseWriter, r *http.Request, params ListPoliciesParams)
	// Create a new policy
	// (POST /policies)
	CreatePolicy(w http.ResponseWriter, r *http.Request, params CreatePolicyParams)
	// Delete a policy
	// (DELETE /policies/{policyId})
	DeletePolicy(w http.ResponseWriter, r *http.Request, policyId PolicyIdPath)
	// Get a policy
	// (GET /policies/{policyId})
	GetPolicy(w http.ResponseWriter, r *http.Request, policyId PolicyIdPath)
	// Update a policy
	// (PATCH /policies/{policyId})
	UpdatePolicy(w http.ResponseWriter, r *http.Request, policyId PolicyIdPath)
}

ServerInterface represents all server handlers.

func NewStrictHandler

func NewStrictHandler(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc) ServerInterface

func NewStrictHandlerWithOptions

func NewStrictHandlerWithOptions(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc, options StrictHTTPServerOptions) ServerInterface

type ServerInterfaceWrapper

type ServerInterfaceWrapper struct {
	Handler            ServerInterface
	HandlerMiddlewares []MiddlewareFunc
	ErrorHandlerFunc   func(w http.ResponseWriter, r *http.Request, err error)
}

ServerInterfaceWrapper converts contexts to parameters.

func (*ServerInterfaceWrapper) CreatePolicy

func (siw *ServerInterfaceWrapper) CreatePolicy(w http.ResponseWriter, r *http.Request)

CreatePolicy operation middleware

func (*ServerInterfaceWrapper) DeletePolicy

func (siw *ServerInterfaceWrapper) DeletePolicy(w http.ResponseWriter, r *http.Request)

DeletePolicy operation middleware

func (*ServerInterfaceWrapper) GetHealth

func (siw *ServerInterfaceWrapper) GetHealth(w http.ResponseWriter, r *http.Request)

GetHealth operation middleware

func (*ServerInterfaceWrapper) GetPolicy

func (siw *ServerInterfaceWrapper) GetPolicy(w http.ResponseWriter, r *http.Request)

GetPolicy operation middleware

func (*ServerInterfaceWrapper) ListPolicies

func (siw *ServerInterfaceWrapper) ListPolicies(w http.ResponseWriter, r *http.Request)

ListPolicies operation middleware

func (*ServerInterfaceWrapper) UpdatePolicy

func (siw *ServerInterfaceWrapper) UpdatePolicy(w http.ResponseWriter, r *http.Request)

UpdatePolicy operation middleware

type StrictHTTPServerOptions

type StrictHTTPServerOptions struct {
	RequestErrorHandlerFunc  func(w http.ResponseWriter, r *http.Request, err error)
	ResponseErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}

type StrictServerInterface

type StrictServerInterface interface {
	// Health check
	// (GET /health)
	GetHealth(ctx context.Context, request GetHealthRequestObject) (GetHealthResponseObject, error)
	// List policies
	// (GET /policies)
	ListPolicies(ctx context.Context, request ListPoliciesRequestObject) (ListPoliciesResponseObject, error)
	// Create a new policy
	// (POST /policies)
	CreatePolicy(ctx context.Context, request CreatePolicyRequestObject) (CreatePolicyResponseObject, error)
	// Delete a policy
	// (DELETE /policies/{policyId})
	DeletePolicy(ctx context.Context, request DeletePolicyRequestObject) (DeletePolicyResponseObject, error)
	// Get a policy
	// (GET /policies/{policyId})
	GetPolicy(ctx context.Context, request GetPolicyRequestObject) (GetPolicyResponseObject, error)
	// Update a policy
	// (PATCH /policies/{policyId})
	UpdatePolicy(ctx context.Context, request UpdatePolicyRequestObject) (UpdatePolicyResponseObject, error)
}

StrictServerInterface represents all server handlers.

type TooManyValuesForParamError

type TooManyValuesForParamError struct {
	ParamName string
	Count     int
}

func (*TooManyValuesForParamError) Error

type Unauthorized

type Unauthorized = Error

Unauthorized Error response following RFC 7807 Problem Details and AEP-193.

Provides structured error information for API failures.

type UnauthorizedJSONResponse

type UnauthorizedJSONResponse Error

type UnescapedCookieParamError

type UnescapedCookieParamError struct {
	ParamName string
	Err       error
}

func (*UnescapedCookieParamError) Error

func (e *UnescapedCookieParamError) Error() string

func (*UnescapedCookieParamError) Unwrap

func (e *UnescapedCookieParamError) Unwrap() error

type Unimplemented

type Unimplemented struct{}

func (Unimplemented) CreatePolicy

func (_ Unimplemented) CreatePolicy(w http.ResponseWriter, r *http.Request, params CreatePolicyParams)

Create a new policy (POST /policies)

func (Unimplemented) DeletePolicy

func (_ Unimplemented) DeletePolicy(w http.ResponseWriter, r *http.Request, policyId PolicyIdPath)

Delete a policy (DELETE /policies/{policyId})

func (Unimplemented) GetHealth

func (_ Unimplemented) GetHealth(w http.ResponseWriter, r *http.Request)

Health check (GET /health)

func (Unimplemented) GetPolicy

func (_ Unimplemented) GetPolicy(w http.ResponseWriter, r *http.Request, policyId PolicyIdPath)

Get a policy (GET /policies/{policyId})

func (Unimplemented) ListPolicies

func (_ Unimplemented) ListPolicies(w http.ResponseWriter, r *http.Request, params ListPoliciesParams)

List policies (GET /policies)

func (Unimplemented) UpdatePolicy

func (_ Unimplemented) UpdatePolicy(w http.ResponseWriter, r *http.Request, policyId PolicyIdPath)

Update a policy (PATCH /policies/{policyId})

type UnmarshalingParamError

type UnmarshalingParamError struct {
	ParamName string
	Err       error
}

func (*UnmarshalingParamError) Error

func (e *UnmarshalingParamError) Error() string

func (*UnmarshalingParamError) Unwrap

func (e *UnmarshalingParamError) Unwrap() error

type UpdatePolicy200JSONResponse

type UpdatePolicy200JSONResponse Policy

func (UpdatePolicy200JSONResponse) VisitUpdatePolicyResponse

func (response UpdatePolicy200JSONResponse) VisitUpdatePolicyResponse(w http.ResponseWriter) error

type UpdatePolicy400JSONResponse

type UpdatePolicy400JSONResponse struct{ BadRequestJSONResponse }

func (UpdatePolicy400JSONResponse) VisitUpdatePolicyResponse

func (response UpdatePolicy400JSONResponse) VisitUpdatePolicyResponse(w http.ResponseWriter) error

type UpdatePolicy401JSONResponse

type UpdatePolicy401JSONResponse struct{ UnauthorizedJSONResponse }

func (UpdatePolicy401JSONResponse) VisitUpdatePolicyResponse

func (response UpdatePolicy401JSONResponse) VisitUpdatePolicyResponse(w http.ResponseWriter) error

type UpdatePolicy403JSONResponse

type UpdatePolicy403JSONResponse struct{ ForbiddenJSONResponse }

func (UpdatePolicy403JSONResponse) VisitUpdatePolicyResponse

func (response UpdatePolicy403JSONResponse) VisitUpdatePolicyResponse(w http.ResponseWriter) error

type UpdatePolicy404JSONResponse

type UpdatePolicy404JSONResponse struct{ NotFoundJSONResponse }

func (UpdatePolicy404JSONResponse) VisitUpdatePolicyResponse

func (response UpdatePolicy404JSONResponse) VisitUpdatePolicyResponse(w http.ResponseWriter) error

type UpdatePolicy409JSONResponse

type UpdatePolicy409JSONResponse struct{ AlreadyExistsJSONResponse }

func (UpdatePolicy409JSONResponse) VisitUpdatePolicyResponse

func (response UpdatePolicy409JSONResponse) VisitUpdatePolicyResponse(w http.ResponseWriter) error

type UpdatePolicy500JSONResponse

type UpdatePolicy500JSONResponse struct {
	InternalServerErrorJSONResponse
}

func (UpdatePolicy500JSONResponse) VisitUpdatePolicyResponse

func (response UpdatePolicy500JSONResponse) VisitUpdatePolicyResponse(w http.ResponseWriter) error

type UpdatePolicyApplicationMergePatchPlusJSONRequestBody

type UpdatePolicyApplicationMergePatchPlusJSONRequestBody = Policy

UpdatePolicyApplicationMergePatchPlusJSONRequestBody defines body for UpdatePolicy for application/merge-patch+json ContentType.

type UpdatePolicyRequestObject

type UpdatePolicyRequestObject struct {
	PolicyId PolicyIdPath `json:"policyId"`
	Body     *UpdatePolicyApplicationMergePatchPlusJSONRequestBody
}

type UpdatePolicyResponseObject

type UpdatePolicyResponseObject interface {
	VisitUpdatePolicyResponse(w http.ResponseWriter) error
}

type ValidationError

type ValidationError = Error

ValidationError Error response following RFC 7807 Problem Details and AEP-193.

Provides structured error information for API failures.

type ValidationErrorJSONResponse

type ValidationErrorJSONResponse Error

Jump to

Keyboard shortcuts

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