allowedoriginsrest

package
v1.0.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Reader

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

Reader implements a REST handler to read the "allowed origins".

func NewReader

func NewReader(mgr allowedOriginsMgr) *Reader

NewReader returns a new REST handler to read a service's "allowed origins".

func (*Reader) Handler

func (h *Reader) Handler() common.HTTPRequestHandler

Handler returns the handler that should be invoked when an HTTP POST is requested to the target endpoint. This handler must be registered with an HTTP server.

func (*Reader) Method

func (h *Reader) Method() string

Method returns the HTTP method, which is always GET.

func (*Reader) Path

func (h *Reader) Path() string

Path returns the base path of the target URL for this handler.

type Writer

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

Writer implements a REST handler to update the "allowed origins".

func NewWriter

func NewWriter(mgr allowedOriginsMgr) *Writer

NewWriter returns a new REST handler to update the "allowed origins".

func (*Writer) Handler

func (h *Writer) Handler() common.HTTPRequestHandler

Handler returns the handler that should be invoked when an HTTP POST is requested to the target endpoint. This handler must be registered with an HTTP server.

func (*Writer) Method

func (h *Writer) Method() string

Method returns the HTTP method, which is always POST.

func (*Writer) Path

func (h *Writer) Path() string

Path returns the base path of the target URL for this handler.

Jump to

Keyboard shortcuts

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