Documentation ¶
Index ¶
- Variables
- func CacheExpires(r *http.Response) time.Time
- type APIClient
- type APIKey
- type BasicAuth
- type Configuration
- func (c *Configuration) AddDefaultHeader(key string, value string)
- func (c *Configuration) BasePath() string
- func (c *Configuration) DefaultHeader() map[string]string
- func (c *Configuration) HTTPClient() *http.Client
- func (c *Configuration) Host() string
- func (c *Configuration) SetBasePath(apiRoot string)
- func (c *Configuration) SetHost(host string)
- func (c *Configuration) SetUserAgent(userAgent string)
- func (c *Configuration) UserAgent() string
- type DefaultApiService
- func (a *DefaultApiService) PoliciesPolAssoIdDelete(ctx context.Context, polAssoId string) (*http.Response, error)
- func (a *DefaultApiService) PoliciesPolAssoIdGet(ctx context.Context, polAssoId string) (models.PolicyAssociation, *http.Response, error)
- func (a *DefaultApiService) PoliciesPolAssoIdUpdatePost(ctx context.Context, polAssoId string, ...) (models.PolicyUpdate, *http.Response, error)
- func (a *DefaultApiService) PoliciesPost(ctx context.Context, policyAssociationRequest models.PolicyAssociationRequest) (models.PolicyAssociation, *http.Response, error)
- type GenericOpenAPIError
Constants ¶
This section is empty.
Variables ¶
var ( // ContextOAuth2 takes an oauth2.TokenSource as authentication for the request. ContextOAuth2 = contextKey("token") // ContextBasicAuth takes BasicAuth as authentication for the request. ContextBasicAuth = contextKey("basic") // ContextAccessToken takes a string oauth2 access token as authentication for the request. ContextAccessToken = contextKey("accesstoken") // ContextAPIKey takes an APIKey as authentication for the request ContextAPIKey = contextKey("apikey") )
Functions ¶
Types ¶
type APIClient ¶
type APIClient struct { DefaultApi *DefaultApiService // contains filtered or unexported fields }
APIClient manages communication with the Npcf_UEPolicyControl API v1.0.0 In most cases there should be only one, shared, APIClient.
func NewAPIClient ¶
func NewAPIClient(cfg *Configuration) *APIClient
NewAPIClient creates a new API client. Requires a userAgent string describing your application. optionally a custom http.Client to allow for advanced features such as caching.
func (*APIClient) ChangeBasePath ¶
Change base path to allow switching to mocks
type APIKey ¶
APIKey provides API key based authentication to a request passed via context using ContextAPIKey
type BasicAuth ¶
type BasicAuth struct { UserName string `json:"userName,omitempty"` Password string `json:"password,omitempty"` }
BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth
type Configuration ¶
type Configuration struct { Scheme string `json:"scheme,omitempty"` // contains filtered or unexported fields }
func NewConfiguration ¶
func NewConfiguration() *Configuration
func (*Configuration) AddDefaultHeader ¶
func (c *Configuration) AddDefaultHeader(key string, value string)
func (*Configuration) BasePath ¶
func (c *Configuration) BasePath() string
func (*Configuration) DefaultHeader ¶
func (c *Configuration) DefaultHeader() map[string]string
func (*Configuration) HTTPClient ¶
func (c *Configuration) HTTPClient() *http.Client
func (*Configuration) Host ¶
func (c *Configuration) Host() string
func (*Configuration) SetBasePath ¶
func (c *Configuration) SetBasePath(apiRoot string)
func (*Configuration) SetHost ¶
func (c *Configuration) SetHost(host string)
func (*Configuration) SetUserAgent ¶
func (c *Configuration) SetUserAgent(userAgent string)
func (*Configuration) UserAgent ¶
func (c *Configuration) UserAgent() string
type DefaultApiService ¶
type DefaultApiService service
func (*DefaultApiService) PoliciesPolAssoIdDelete ¶
func (a *DefaultApiService) PoliciesPolAssoIdDelete(ctx context.Context, polAssoId string) (*http.Response, error)
DefaultApiService
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param polAssoId Identifier of a policy association
func (*DefaultApiService) PoliciesPolAssoIdGet ¶
func (a *DefaultApiService) PoliciesPolAssoIdGet(ctx context.Context, polAssoId string) (models.PolicyAssociation, *http.Response, error)
DefaultApiService
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param polAssoId Identifier of a policy association
@return PolicyAssociation
func (*DefaultApiService) PoliciesPolAssoIdUpdatePost ¶
func (a *DefaultApiService) PoliciesPolAssoIdUpdatePost(ctx context.Context, polAssoId string, policyAssociationUpdateRequest models.PolicyAssociationUpdateRequest) (models.PolicyUpdate, *http.Response, error)
DefaultApiService
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param polAssoId Identifier of a policy association
- @param policyAssociationUpdateRequest
@return PolicyUpdate
func (*DefaultApiService) PoliciesPost ¶
func (a *DefaultApiService) PoliciesPost(ctx context.Context, policyAssociationRequest models.PolicyAssociationRequest) (models.PolicyAssociation, *http.Response, error)
DefaultApiService
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param policyAssociationRequest
@return PolicyAssociation
type GenericOpenAPIError ¶
type GenericOpenAPIError struct {
// contains filtered or unexported fields
}
GenericOpenAPIError Provides access to the body, error and model on returned errors.
func (GenericOpenAPIError) Body ¶
func (e GenericOpenAPIError) Body() []byte
Body returns the raw bytes of the response
func (GenericOpenAPIError) Error ¶
func (e GenericOpenAPIError) Error() string
Error returns non-empty string if there was an error.
func (GenericOpenAPIError) Model ¶
func (e GenericOpenAPIError) Model() interface{}
Model returns the unpacked model of the error