Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CORS ¶
type CORS struct { Space string `json:"space" validate:"required,min=3,space"` ID ID `json:"corsId"` Method string `json:"method" validate:"eq=GET|eq=POST|eq=DELETE|eq=PUT|eq=PATCH|eq=HEAD|eq=OPTIONS"` Path string `json:"path" validate:"path"` AllowedOrigins []string `json:"allowedOrigins" validate:"min=1"` AllowedMethods []string `json:"allowedMethods" validate:"min=1"` AllowedHeaders []string `json:"allowedHeaders" validate:"min=1"` AllowCredentials bool `json:"allowCredentials"` Metadata metadata.Metadata `json:"metadata,omitempty"` }
CORS is used to configure CORS on HTTP subscriptions.
func (CORS) MarshalLogObject ¶
func (c CORS) MarshalLogObject(enc zapcore.ObjectEncoder) error
MarshalLogObject is a part of zapcore.ObjectMarshaler interface
type ErrCORSAlreadyExists ¶
type ErrCORSAlreadyExists struct {
ID ID
}
ErrCORSAlreadyExists occurs when CORS config with the same ID already exists.
func (ErrCORSAlreadyExists) Error ¶
func (e ErrCORSAlreadyExists) Error() string
type ErrCORSNotFound ¶
type ErrCORSNotFound struct {
ID ID
}
ErrCORSNotFound occurs when CORS config cannot be found.
func (ErrCORSNotFound) Error ¶
func (e ErrCORSNotFound) Error() string
type ErrCORSValidation ¶
type ErrCORSValidation struct {
Message string
}
ErrCORSValidation occurs when CORS configuration payload doesn't validate.
func (ErrCORSValidation) Error ¶
func (e ErrCORSValidation) Error() string
type ErrInvalidCORSUpdate ¶
type ErrInvalidCORSUpdate struct {
Field string
}
ErrInvalidCORSUpdate occurs when a client tries to update a CORS config in a way that changes the CORS ID.
func (ErrInvalidCORSUpdate) Error ¶
func (e ErrInvalidCORSUpdate) Error() string
type Service ¶
type Service interface { GetCORS(space string, id ID) (*CORS, error) ListCORS(space string, filters ...metadata.Filter) (CORSes, error) CreateCORS(c *CORS) (*CORS, error) UpdateCORS(c *CORS) (*CORS, error) DeleteCORS(space string, id ID) error }
Service represents service for managing CORS configuration.
Click to show internal directories.
Click to hide internal directories.