webui_context

package
v1.3.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init added in v1.3.1

func Init()

func RetrySendNFRegistration added in v1.3.1

func RetrySendNFRegistration(maxRetry int) error

func SendDeregisterNFInstance added in v1.3.1

func SendDeregisterNFInstance() (*models.ProblemDetails, error)

func SendNFRegistration added in v1.3.1

func SendNFRegistration() error

func SendSearchNFInstances added in v1.3.1

func SendSearchNFInstances(targetNfType models.NfType) ([]models.NfProfile, error)

Types

type NfInstance added in v1.3.1

type NfInstance struct {
	ValidityPeriod int                `json:"validityPeriod"`
	NfInstances    []models.NfProfile `json:"nfInstances"`
}

type NfOamInstance

type NfOamInstance struct {
	NfId   string
	NfType models.NfType
	Uri    string
}

type WEBUIContext

type WEBUIContext struct {
	NfInstanceID   string
	NFProfiles     []models.NfProfile
	NFOamInstances []NfOamInstance

	// is registered to NRF as AF
	IsRegistered bool

	NrfUri         string
	OAuth2Required bool

	NFManagementClient *Nnrf_NFManagement.APIClient
	NFDiscoveryClient  *Nnrf_NFDiscovery.APIClient
}

func GetSelf added in v1.3.1

func GetSelf() *WEBUIContext

func (*WEBUIContext) GetOamUris

func (context *WEBUIContext) GetOamUris(targetNfType models.NfType) (uris []string)

func (*WEBUIContext) GetTokenCtx added in v1.3.1

func (c *WEBUIContext) GetTokenCtx(serviceName models.ServiceName, targetNF models.NfType) (
	context.Context, *models.ProblemDetails, error,
)

func (*WEBUIContext) NfProfileAlreadyExists

func (context *WEBUIContext) NfProfileAlreadyExists(nfProfile models.NfProfile) bool

func (*WEBUIContext) RequestBindToken added in v1.3.2

func (c *WEBUIContext) RequestBindToken(req *http.Request, ctx context.Context) error

NewRequestWithContext() will not apply header in ctx so httpsClient.Do(req) will not have token in header if OAuth2 enable

func (*WEBUIContext) UpdateNfProfiles

func (context *WEBUIContext) UpdateNfProfiles()

Jump to

Keyboard shortcuts

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