mt

package
v0.0.0-...-e84ac6a Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2024 License: Apache-2.0 Imports: 48 Imported by: 0

Documentation

Overview

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

Code generated by github.com/deepmap/oapi-codegen/v2 version v2.0.1-0.20240123090344-d326c01d279a DO NOT EDIT.

Index

Constants

View Source
const (
	OAuth2ClientCredentialsScopes = "oAuth2ClientCredentials.Scopes"
)

Variables

This section is empty.

Functions

func GetLoader

func GetLoader() loader.SpecLoader

func NewProvideLocationInfoRequest

func NewProvideLocationInfoRequest(server string, supi externalRef0.Supi, body ProvideLocationInfoJSONRequestBody) (*http.Request, error)

NewProvideLocationInfoRequest calls the generic ProvideLocationInfo builder with application/json body

func NewProvideLocationInfoRequestWithBody

func NewProvideLocationInfoRequestWithBody(server string, supi externalRef0.Supi, contentType string, body io.Reader) (*http.Request, error)

NewProvideLocationInfoRequestWithBody generates requests for ProvideLocationInfo with any type of body

func NewQueryUeInfoRequest

func NewQueryUeInfoRequest(server string, supi externalRef0.Supi, params *QueryUeInfoParams) (*http.Request, error)

NewQueryUeInfoRequest generates requests for QueryUeInfo

func RegisterHandlers

func RegisterHandlers(router gin.IRouter, si ServerInterface)

RegisterHandlers creates http.Handler with routing matching OpenAPI spec.

func RegisterHandlersWithOptions

func RegisterHandlersWithOptions(router gin.IRouter, si ServerInterface, options GinServerOptions)

RegisterHandlersWithOptions creates http.Handler with additional options

Types

type Client

type Client struct {
	// The endpoint of the server conforming to this interface, with scheme,
	// https://api.deepmap.com for example. This can contain a path relative
	// to the server, such as https://api.deepmap.com/dev-test, and all the
	// paths in the swagger spec will be appended to the server.
	Server string

	// Doer for performing requests, typically a *http.Client with any
	// customized settings, such as certificate chains.
	Client HttpRequestDoer

	// A list of callbacks for modifying requests which are generated before sending over
	// the network.
	RequestEditors []RequestEditorFn
}

Client which conforms to the OpenAPI3 specification for this service.

func NewClient

func NewClient(server string, opts ...ClientOption) (*Client, error)

Creates a new Client, with reasonable defaults

func (*Client) ProvideLocationInfo

func (c *Client) ProvideLocationInfo(ctx context.Context, supi externalRef0.Supi, body ProvideLocationInfoJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ProvideLocationInfoWithBody

func (c *Client) ProvideLocationInfoWithBody(ctx context.Context, supi externalRef0.Supi, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) QueryUeInfo

func (c *Client) QueryUeInfo(ctx context.Context, supi externalRef0.Supi, params *QueryUeInfoParams, reqEditors ...RequestEditorFn) (*http.Response, error)

type ClientInterface

type ClientInterface interface {
	// QueryUeInfo request
	QueryUeInfo(ctx context.Context, supi externalRef0.Supi, params *QueryUeInfoParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ProvideLocationInfoWithBody request with any body
	ProvideLocationInfoWithBody(ctx context.Context, supi externalRef0.Supi, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	ProvideLocationInfo(ctx context.Context, supi externalRef0.Supi, body ProvideLocationInfoJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
}

The interface specification for the client above.

type ClientOption

type ClientOption func(*Client) error

ClientOption allows setting custom parameters during construction

func WithBaseURL

func WithBaseURL(baseURL string) ClientOption

WithBaseURL overrides the baseURL.

func WithHTTPClient

func WithHTTPClient(doer HttpRequestDoer) ClientOption

WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.

func WithRequestEditorFn

func WithRequestEditorFn(fn RequestEditorFn) ClientOption

WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.

type ClientWithResponses

type ClientWithResponses struct {
	ClientInterface
}

ClientWithResponses builds on ClientInterface to offer response payloads

func NewClientWithResponses

func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)

NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling

func (*ClientWithResponses) ProvideLocationInfoWithBodyWithResponse

func (c *ClientWithResponses) ProvideLocationInfoWithBodyWithResponse(ctx context.Context, supi externalRef0.Supi, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ProvideLocationInfoResponse, error)

ProvideLocationInfoWithBodyWithResponse request with arbitrary body returning *ProvideLocationInfoResponse

func (*ClientWithResponses) ProvideLocationInfoWithResponse

func (c *ClientWithResponses) ProvideLocationInfoWithResponse(ctx context.Context, supi externalRef0.Supi, body ProvideLocationInfoJSONRequestBody, reqEditors ...RequestEditorFn) (*ProvideLocationInfoResponse, error)

func (*ClientWithResponses) QueryUeInfoWithResponse

func (c *ClientWithResponses) QueryUeInfoWithResponse(ctx context.Context, supi externalRef0.Supi, params *QueryUeInfoParams, reqEditors ...RequestEditorFn) (*QueryUeInfoResponse, error)

QueryUeInfoWithResponse request returning *QueryUeInfoResponse

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// QueryUeInfoWithResponse request
	QueryUeInfoWithResponse(ctx context.Context, supi externalRef0.Supi, params *QueryUeInfoParams, reqEditors ...RequestEditorFn) (*QueryUeInfoResponse, error)

	// ProvideLocationInfoWithBodyWithResponse request with any body
	ProvideLocationInfoWithBodyWithResponse(ctx context.Context, supi externalRef0.Supi, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ProvideLocationInfoResponse, error)

	ProvideLocationInfoWithResponse(ctx context.Context, supi externalRef0.Supi, body ProvideLocationInfoJSONRequestBody, reqEditors ...RequestEditorFn) (*ProvideLocationInfoResponse, error)
}

ClientWithResponsesInterface is the interface specification for the client with responses above.

type GinServerOptions

type GinServerOptions struct {
	BaseURL      string
	Middlewares  []MiddlewareFunc
	ErrorHandler func(*gin.Context, error, int)
}

GinServerOptions provides options for the Gin server.

type HttpRequestDoer

type HttpRequestDoer interface {
	Do(req *http.Request) (*http.Response, error)
}

Doer performs HTTP requests.

The standard http.Client implements this interface.

type MiddlewareFunc

type MiddlewareFunc func(c *gin.Context)

type ProvideLocationInfo200JSONResponse

type ProvideLocationInfo200JSONResponse externalRef0.LocationInfoResult

func (ProvideLocationInfo200JSONResponse) VisitProvideLocationInfoResponse

func (response ProvideLocationInfo200JSONResponse) VisitProvideLocationInfoResponse(w http.ResponseWriter) error

type ProvideLocationInfo400ApplicationProblemPlusJSONResponse

type ProvideLocationInfo400ApplicationProblemPlusJSONResponse struct {
	externalRef0.N400ApplicationProblemPlusJSONResponse
}

func (ProvideLocationInfo400ApplicationProblemPlusJSONResponse) VisitProvideLocationInfoResponse

func (response ProvideLocationInfo400ApplicationProblemPlusJSONResponse) VisitProvideLocationInfoResponse(w http.ResponseWriter) error

type ProvideLocationInfo404ApplicationProblemPlusJSONResponse

type ProvideLocationInfo404ApplicationProblemPlusJSONResponse struct {
	externalRef0.N404ApplicationProblemPlusJSONResponse
}

func (ProvideLocationInfo404ApplicationProblemPlusJSONResponse) VisitProvideLocationInfoResponse

func (response ProvideLocationInfo404ApplicationProblemPlusJSONResponse) VisitProvideLocationInfoResponse(w http.ResponseWriter) error

type ProvideLocationInfo500ApplicationProblemPlusJSONResponse

type ProvideLocationInfo500ApplicationProblemPlusJSONResponse struct {
	externalRef0.N500ApplicationProblemPlusJSONResponse
}

func (ProvideLocationInfo500ApplicationProblemPlusJSONResponse) VisitProvideLocationInfoResponse

func (response ProvideLocationInfo500ApplicationProblemPlusJSONResponse) VisitProvideLocationInfoResponse(w http.ResponseWriter) error

type ProvideLocationInfo501ApplicationProblemPlusJSONResponse

type ProvideLocationInfo501ApplicationProblemPlusJSONResponse struct {
	externalRef0.N501ApplicationProblemPlusJSONResponse
}

func (ProvideLocationInfo501ApplicationProblemPlusJSONResponse) VisitProvideLocationInfoResponse

func (response ProvideLocationInfo501ApplicationProblemPlusJSONResponse) VisitProvideLocationInfoResponse(w http.ResponseWriter) error

type ProvideLocationInfo503ApplicationProblemPlusJSONResponse

type ProvideLocationInfo503ApplicationProblemPlusJSONResponse struct {
	externalRef0.N503ApplicationProblemPlusJSONResponse
}

func (ProvideLocationInfo503ApplicationProblemPlusJSONResponse) VisitProvideLocationInfoResponse

func (response ProvideLocationInfo503ApplicationProblemPlusJSONResponse) VisitProvideLocationInfoResponse(w http.ResponseWriter) error

type ProvideLocationInfoJSONRequestBody

type ProvideLocationInfoJSONRequestBody = externalRef0.LocationInfoRequest

ProvideLocationInfoJSONRequestBody defines body for ProvideLocationInfo for application/json ContentType.

type ProvideLocationInfoRequestObject

type ProvideLocationInfoRequestObject struct {
	Supi externalRef0.Supi `json:"supi"`
	Body *ProvideLocationInfoJSONRequestBody
}

type ProvideLocationInfoResponse

type ProvideLocationInfoResponse struct {
	Body                          []byte
	HTTPResponse                  *http.Response
	JSON200                       *externalRef0.LocationInfoResult
	ApplicationproblemJSON400     *externalRef0.N400
	ApplicationproblemJSON404     *externalRef0.N404
	ApplicationproblemJSON500     *externalRef0.N500
	ApplicationproblemJSON501     *externalRef0.N501
	ApplicationproblemJSON503     *externalRef0.N503
	ApplicationproblemJSONDefault *externalRef0.ProblemDetails
}

func ParseProvideLocationInfoResponse

func ParseProvideLocationInfoResponse(rsp *http.Response) (*ProvideLocationInfoResponse, error)

ParseProvideLocationInfoResponse parses an HTTP response from a ProvideLocationInfoWithResponse call

func (ProvideLocationInfoResponse) Status

Status returns HTTPResponse.Status

func (ProvideLocationInfoResponse) StatusCode

func (r ProvideLocationInfoResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ProvideLocationInfoResponseObject

type ProvideLocationInfoResponseObject interface {
	VisitProvideLocationInfoResponse(w http.ResponseWriter) error
}

type ProvideLocationInfodefaultApplicationProblemPlusJSONResponse

type ProvideLocationInfodefaultApplicationProblemPlusJSONResponse struct {
	Body       externalRef0.ProblemDetails
	StatusCode int
}

func (ProvideLocationInfodefaultApplicationProblemPlusJSONResponse) VisitProvideLocationInfoResponse

func (response ProvideLocationInfodefaultApplicationProblemPlusJSONResponse) VisitProvideLocationInfoResponse(w http.ResponseWriter) error

type QueryUeInfo200JSONResponse

type QueryUeInfo200JSONResponse externalRef0.UeInfo

func (QueryUeInfo200JSONResponse) VisitQueryUeInfoResponse

func (response QueryUeInfo200JSONResponse) VisitQueryUeInfoResponse(w http.ResponseWriter) error

type QueryUeInfo400ApplicationProblemPlusJSONResponse

type QueryUeInfo400ApplicationProblemPlusJSONResponse struct {
	externalRef0.N400ApplicationProblemPlusJSONResponse
}

func (QueryUeInfo400ApplicationProblemPlusJSONResponse) VisitQueryUeInfoResponse

func (response QueryUeInfo400ApplicationProblemPlusJSONResponse) VisitQueryUeInfoResponse(w http.ResponseWriter) error

type QueryUeInfo404ApplicationProblemPlusJSONResponse

type QueryUeInfo404ApplicationProblemPlusJSONResponse struct {
	externalRef0.N404ApplicationProblemPlusJSONResponse
}

func (QueryUeInfo404ApplicationProblemPlusJSONResponse) VisitQueryUeInfoResponse

func (response QueryUeInfo404ApplicationProblemPlusJSONResponse) VisitQueryUeInfoResponse(w http.ResponseWriter) error

type QueryUeInfo500ApplicationProblemPlusJSONResponse

type QueryUeInfo500ApplicationProblemPlusJSONResponse struct {
	externalRef0.N500ApplicationProblemPlusJSONResponse
}

func (QueryUeInfo500ApplicationProblemPlusJSONResponse) VisitQueryUeInfoResponse

func (response QueryUeInfo500ApplicationProblemPlusJSONResponse) VisitQueryUeInfoResponse(w http.ResponseWriter) error

type QueryUeInfo501ApplicationProblemPlusJSONResponse

type QueryUeInfo501ApplicationProblemPlusJSONResponse struct {
	externalRef0.N501ApplicationProblemPlusJSONResponse
}

func (QueryUeInfo501ApplicationProblemPlusJSONResponse) VisitQueryUeInfoResponse

func (response QueryUeInfo501ApplicationProblemPlusJSONResponse) VisitQueryUeInfoResponse(w http.ResponseWriter) error

type QueryUeInfo503ApplicationProblemPlusJSONResponse

type QueryUeInfo503ApplicationProblemPlusJSONResponse struct {
	externalRef0.N503ApplicationProblemPlusJSONResponse
}

func (QueryUeInfo503ApplicationProblemPlusJSONResponse) VisitQueryUeInfoResponse

func (response QueryUeInfo503ApplicationProblemPlusJSONResponse) VisitQueryUeInfoResponse(w http.ResponseWriter) error

type QueryUeInfoParams

type QueryUeInfoParams struct {
	// Fields attributes to be retrieved
	Fields []string `form:"fields" json:"fields"`

	// SupportedFeatures Supported Features
	SupportedFeatures *externalRef0.SupportedFeatures `form:"supported-features,omitempty" json:"supported-features,omitempty"`
}

QueryUeInfoParams defines parameters for QueryUeInfo.

type QueryUeInfoRequestObject

type QueryUeInfoRequestObject struct {
	Supi   externalRef0.Supi `json:"supi"`
	Params QueryUeInfoParams
}

type QueryUeInfoResponse

type QueryUeInfoResponse struct {
	Body                          []byte
	HTTPResponse                  *http.Response
	JSON200                       *externalRef0.UeInfo
	ApplicationproblemJSON400     *externalRef0.N400
	ApplicationproblemJSON404     *externalRef0.N404
	ApplicationproblemJSON500     *externalRef0.N500
	ApplicationproblemJSON501     *externalRef0.N501
	ApplicationproblemJSON503     *externalRef0.N503
	ApplicationproblemJSONDefault *externalRef0.ProblemDetails
}

func ParseQueryUeInfoResponse

func ParseQueryUeInfoResponse(rsp *http.Response) (*QueryUeInfoResponse, error)

ParseQueryUeInfoResponse parses an HTTP response from a QueryUeInfoWithResponse call

func (QueryUeInfoResponse) Status

func (r QueryUeInfoResponse) Status() string

Status returns HTTPResponse.Status

func (QueryUeInfoResponse) StatusCode

func (r QueryUeInfoResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type QueryUeInfoResponseObject

type QueryUeInfoResponseObject interface {
	VisitQueryUeInfoResponse(w http.ResponseWriter) error
}

type QueryUeInfodefaultApplicationProblemPlusJSONResponse

type QueryUeInfodefaultApplicationProblemPlusJSONResponse struct {
	Body       externalRef0.ProblemDetails
	StatusCode int
}

func (QueryUeInfodefaultApplicationProblemPlusJSONResponse) VisitQueryUeInfoResponse

type RequestEditorFn

type RequestEditorFn func(ctx context.Context, req *http.Request) error

RequestEditorFn is the function signature for the RequestEditor callback function

type ServerInterface

type ServerInterface interface {
	// Query Information for the UE
	// (GET /{supi})
	QueryUeInfo(c *gin.Context, supi externalRef0.Supi, params QueryUeInfoParams)
	// Provides the UE's 5GS location information
	// (POST /{supi}/loc-info/provide-loc-info)
	ProvideLocationInfo(c *gin.Context, supi externalRef0.Supi)
}

ServerInterface represents all server handlers.

func NewStrictHandler

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

type ServerInterfaceWrapper

type ServerInterfaceWrapper struct {
	Handler            ServerInterface
	HandlerMiddlewares []MiddlewareFunc
	ErrorHandler       func(*gin.Context, error, int)
}

ServerInterfaceWrapper converts contexts to parameters.

func (*ServerInterfaceWrapper) ProvideLocationInfo

func (siw *ServerInterfaceWrapper) ProvideLocationInfo(c *gin.Context)

ProvideLocationInfo operation middleware

func (*ServerInterfaceWrapper) QueryUeInfo

func (siw *ServerInterfaceWrapper) QueryUeInfo(c *gin.Context)

QueryUeInfo operation middleware

type StrictHandlerFunc

type StrictHandlerFunc = strictgin.StrictGinHandlerFunc

type StrictMiddlewareFunc

type StrictMiddlewareFunc = strictgin.StrictGinMiddlewareFunc

type StrictServerInterface

type StrictServerInterface interface {
	// Query Information for the UE
	// (GET /{supi})
	QueryUeInfo(ctx context.Context, request QueryUeInfoRequestObject) (QueryUeInfoResponseObject, error)
	// Provides the UE's 5GS location information
	// (POST /{supi}/loc-info/provide-loc-info)
	ProvideLocationInfo(ctx context.Context, request ProvideLocationInfoRequestObject) (ProvideLocationInfoResponseObject, error)
}

StrictServerInterface represents all server handlers.

Jump to

Keyboard shortcuts

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