adapters

package
v0.0.0-...-2119b44 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAgentFactory

func NewAgentFactory(testAgentHost, operatorAgentHost string, timeout time.Duration, debug bool) *agentFactory

Types

type AgentAdapter

type AgentAdapter interface {
	BindSim(context.Context, string) (any, error)
	GetSim(context.Context, string) (any, error)
	GetUsages(context.Context, string, string, string, string, string) (any, any, error)
	ActivateSim(context.Context, string) error
	DeactivateSim(context.Context, string) error
	TerminateSim(context.Context, string) error
	Close()
}

type AgentFactory

type AgentFactory interface {
	GetAgentAdapter(ukama.SimType) (AgentAdapter, bool)
}

type OperatorAgentAdaper

type OperatorAgentAdaper struct {
	// contains filtered or unexported fields
}

func NewOperatorAgentAdapter

func NewOperatorAgentAdapter(operatorAgentHost string, debug bool) (*OperatorAgentAdaper, error)

func (*OperatorAgentAdaper) ActivateSim

func (o *OperatorAgentAdaper) ActivateSim(ctx context.Context, iccid string) error

func (*OperatorAgentAdaper) BindSim

func (o *OperatorAgentAdaper) BindSim(ctx context.Context, iccid string) (any, error)

func (*OperatorAgentAdaper) Close

func (t *OperatorAgentAdaper) Close()

func (*OperatorAgentAdaper) DeactivateSim

func (o *OperatorAgentAdaper) DeactivateSim(ctx context.Context, iccid string) error

func (*OperatorAgentAdaper) GetSim

func (o *OperatorAgentAdaper) GetSim(ctx context.Context, iccid string) (any, error)

func (*OperatorAgentAdaper) GetUsages

func (o *OperatorAgentAdaper) GetUsages(ctx context.Context, iccid, cdrType, from, to, region string) (any, any, error)

func (*OperatorAgentAdaper) TerminateSim

func (o *OperatorAgentAdaper) TerminateSim(ctx context.Context, iccid string) error

type TestAgentAdapter

type TestAgentAdapter struct {
	// contains filtered or unexported fields
}

func NewTestAgentAdapter

func NewTestAgentAdapter(testAgentHost string, timeout time.Duration) (*TestAgentAdapter, error)

func (*TestAgentAdapter) ActivateSim

func (t *TestAgentAdapter) ActivateSim(ctx context.Context, iccid string) error

func (*TestAgentAdapter) BindSim

func (t *TestAgentAdapter) BindSim(ctx context.Context, iccid string) (any, error)

func (*TestAgentAdapter) Close

func (t *TestAgentAdapter) Close()

func (*TestAgentAdapter) DeactivateSim

func (t *TestAgentAdapter) DeactivateSim(ctx context.Context, iccid string) error

func (*TestAgentAdapter) GetSim

func (t *TestAgentAdapter) GetSim(ctx context.Context, iccid string) (any, error)

func (*TestAgentAdapter) GetUsages

func (t *TestAgentAdapter) GetUsages(ctx context.Context, iccid, cdrType, from, to, region string) (any, any, error)

func (*TestAgentAdapter) TerminateSim

func (t *TestAgentAdapter) TerminateSim(ctx context.Context, iccid string) error

Jump to

Keyboard shortcuts

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