Npcf_UEPolicy

package
v0.0.0-...-0896565 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2020 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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

func CacheExpires

func CacheExpires(r *http.Response) time.Time

CacheExpires helper function to determine remaining time before repeating a request.

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

func (c *APIClient) ChangeBasePath(path string)

Change base path to allow switching to mocks

type APIKey

type APIKey struct {
	Key    string
	Prefix string
}

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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