judge

package
v0.15.2 Latest Latest
Warning

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

Go to latest
Published: May 4, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client for judge API

func New

func New(transport runtime.ClientTransport, formats strfmt.Registry) *Client

New creates a new judge API client.

func (*Client) Judge

func (a *Client) Judge(params *JudgeParams) (*JudgeOK, error)

Judge judges if a request should be allowed or not

This endpoint mirrors the proxy capability of ORY Oathkeeper's proxy functionality but instead of forwarding the request to the upstream server, returns 200 (request should be allowed), 401 (unauthorized), or 403 (forbidden) status codes. This endpoint can be used to integrate with other API Proxies like Ambassador, Kong, Envoy, and many more.

func (*Client) SetTransport

func (a *Client) SetTransport(transport runtime.ClientTransport)

SetTransport changes the transport on the client

type JudgeForbidden

type JudgeForbidden struct {
	Payload *JudgeForbiddenBody
}

JudgeForbidden handles this case with default header values.

The standard error format

func NewJudgeForbidden

func NewJudgeForbidden() *JudgeForbidden

NewJudgeForbidden creates a JudgeForbidden with default headers values

func (*JudgeForbidden) Error

func (o *JudgeForbidden) Error() string

type JudgeForbiddenBody

type JudgeForbiddenBody struct {

	// code
	Code int64 `json:"code,omitempty"`

	// details
	Details []map[string]interface{} `json:"details"`

	// message
	Message string `json:"message,omitempty"`

	// reason
	Reason string `json:"reason,omitempty"`

	// request
	Request string `json:"request,omitempty"`

	// status
	Status string `json:"status,omitempty"`
}

JudgeForbiddenBody judge forbidden body swagger:model JudgeForbiddenBody

func (*JudgeForbiddenBody) MarshalBinary

func (o *JudgeForbiddenBody) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*JudgeForbiddenBody) UnmarshalBinary

func (o *JudgeForbiddenBody) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*JudgeForbiddenBody) Validate

func (o *JudgeForbiddenBody) Validate(formats strfmt.Registry) error

Validate validates this judge forbidden body

type JudgeInternalServerError

type JudgeInternalServerError struct {
	Payload *JudgeInternalServerErrorBody
}

JudgeInternalServerError handles this case with default header values.

The standard error format

func NewJudgeInternalServerError

func NewJudgeInternalServerError() *JudgeInternalServerError

NewJudgeInternalServerError creates a JudgeInternalServerError with default headers values

func (*JudgeInternalServerError) Error

func (o *JudgeInternalServerError) Error() string

type JudgeInternalServerErrorBody

type JudgeInternalServerErrorBody struct {

	// code
	Code int64 `json:"code,omitempty"`

	// details
	Details []map[string]interface{} `json:"details"`

	// message
	Message string `json:"message,omitempty"`

	// reason
	Reason string `json:"reason,omitempty"`

	// request
	Request string `json:"request,omitempty"`

	// status
	Status string `json:"status,omitempty"`
}

JudgeInternalServerErrorBody judge internal server error body swagger:model JudgeInternalServerErrorBody

func (*JudgeInternalServerErrorBody) MarshalBinary

func (o *JudgeInternalServerErrorBody) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*JudgeInternalServerErrorBody) UnmarshalBinary

func (o *JudgeInternalServerErrorBody) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*JudgeInternalServerErrorBody) Validate

func (o *JudgeInternalServerErrorBody) Validate(formats strfmt.Registry) error

Validate validates this judge internal server error body

type JudgeNotFound

type JudgeNotFound struct {
	Payload *JudgeNotFoundBody
}

JudgeNotFound handles this case with default header values.

The standard error format

func NewJudgeNotFound

func NewJudgeNotFound() *JudgeNotFound

NewJudgeNotFound creates a JudgeNotFound with default headers values

func (*JudgeNotFound) Error

func (o *JudgeNotFound) Error() string

type JudgeNotFoundBody

type JudgeNotFoundBody struct {

	// code
	Code int64 `json:"code,omitempty"`

	// details
	Details []map[string]interface{} `json:"details"`

	// message
	Message string `json:"message,omitempty"`

	// reason
	Reason string `json:"reason,omitempty"`

	// request
	Request string `json:"request,omitempty"`

	// status
	Status string `json:"status,omitempty"`
}

JudgeNotFoundBody judge not found body swagger:model JudgeNotFoundBody

func (*JudgeNotFoundBody) MarshalBinary

func (o *JudgeNotFoundBody) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*JudgeNotFoundBody) UnmarshalBinary

func (o *JudgeNotFoundBody) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*JudgeNotFoundBody) Validate

func (o *JudgeNotFoundBody) Validate(formats strfmt.Registry) error

Validate validates this judge not found body

type JudgeOK

type JudgeOK struct {
}

JudgeOK handles this case with default header values.

An empty response

func NewJudgeOK

func NewJudgeOK() *JudgeOK

NewJudgeOK creates a JudgeOK with default headers values

func (*JudgeOK) Error

func (o *JudgeOK) Error() string

type JudgeParams

type JudgeParams struct {
	Context    context.Context
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

JudgeParams contains all the parameters to send to the API endpoint for the judge operation typically these are written to a http.Request

func NewJudgeParams

func NewJudgeParams() *JudgeParams

NewJudgeParams creates a new JudgeParams object with the default values initialized.

func NewJudgeParamsWithContext

func NewJudgeParamsWithContext(ctx context.Context) *JudgeParams

NewJudgeParamsWithContext creates a new JudgeParams object with the default values initialized, and the ability to set a context for a request

func NewJudgeParamsWithHTTPClient

func NewJudgeParamsWithHTTPClient(client *http.Client) *JudgeParams

NewJudgeParamsWithHTTPClient creates a new JudgeParams object with the default values initialized, and the ability to set a custom HTTPClient for a request

func NewJudgeParamsWithTimeout

func NewJudgeParamsWithTimeout(timeout time.Duration) *JudgeParams

NewJudgeParamsWithTimeout creates a new JudgeParams object with the default values initialized, and the ability to set a timeout on a request

func (*JudgeParams) SetContext

func (o *JudgeParams) SetContext(ctx context.Context)

SetContext adds the context to the judge params

func (*JudgeParams) SetHTTPClient

func (o *JudgeParams) SetHTTPClient(client *http.Client)

SetHTTPClient adds the HTTPClient to the judge params

func (*JudgeParams) SetTimeout

func (o *JudgeParams) SetTimeout(timeout time.Duration)

SetTimeout adds the timeout to the judge params

func (*JudgeParams) WithContext

func (o *JudgeParams) WithContext(ctx context.Context) *JudgeParams

WithContext adds the context to the judge params

func (*JudgeParams) WithHTTPClient

func (o *JudgeParams) WithHTTPClient(client *http.Client) *JudgeParams

WithHTTPClient adds the HTTPClient to the judge params

func (*JudgeParams) WithTimeout

func (o *JudgeParams) WithTimeout(timeout time.Duration) *JudgeParams

WithTimeout adds the timeout to the judge params

func (*JudgeParams) WriteToRequest

func (o *JudgeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error

WriteToRequest writes these params to a swagger request

type JudgeReader

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

JudgeReader is a Reader for the Judge structure.

func (*JudgeReader) ReadResponse

func (o *JudgeReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)

ReadResponse reads a server response into the received o.

type JudgeUnauthorized

type JudgeUnauthorized struct {
	Payload *JudgeUnauthorizedBody
}

JudgeUnauthorized handles this case with default header values.

The standard error format

func NewJudgeUnauthorized

func NewJudgeUnauthorized() *JudgeUnauthorized

NewJudgeUnauthorized creates a JudgeUnauthorized with default headers values

func (*JudgeUnauthorized) Error

func (o *JudgeUnauthorized) Error() string

type JudgeUnauthorizedBody

type JudgeUnauthorizedBody struct {

	// code
	Code int64 `json:"code,omitempty"`

	// details
	Details []map[string]interface{} `json:"details"`

	// message
	Message string `json:"message,omitempty"`

	// reason
	Reason string `json:"reason,omitempty"`

	// request
	Request string `json:"request,omitempty"`

	// status
	Status string `json:"status,omitempty"`
}

JudgeUnauthorizedBody judge unauthorized body swagger:model JudgeUnauthorizedBody

func (*JudgeUnauthorizedBody) MarshalBinary

func (o *JudgeUnauthorizedBody) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*JudgeUnauthorizedBody) UnmarshalBinary

func (o *JudgeUnauthorizedBody) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*JudgeUnauthorizedBody) Validate

func (o *JudgeUnauthorizedBody) Validate(formats strfmt.Registry) error

Validate validates this judge unauthorized body

Jump to

Keyboard shortcuts

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