stork

package
v0.0.0-...-683b059 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2022 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Overview

Package stork contains utilities for communicating with the Stork API, which creates test eSIM profiles.

Index

Constants

View Source
const (
	// CleanupProfileTime is the time which should be allocated for running a CleanupProfileFunc.
	CleanupProfileTime = 1 * time.Minute
)

Variables

This section is empty.

Functions

func FetchStorkProfile

func FetchStorkProfile(ctx context.Context) (ActivationCode, CleanupProfileFunc, error)

FetchStorkProfile fetches a test eSIM profile from Stork.

Types

type ActivationCode

type ActivationCode string

ActivationCode to be used to install an eSIM profile.

type CleanupProfileFunc

type CleanupProfileFunc func(ctx context.Context) error

CleanupProfileFunc alerts Stork that the profile has been used.

type ProfileListData

type ProfileListData struct {
	Eid                         string `json:"eid"`
	ConfirmationCode            string `json:"confirmationCode"`
	MaxConfirmationCodeAttempts int    `json:"maxConfirmationCodeAttempts"`
	MaxDownloadAttempts         int    `json:"maxDownloadAttempts"`
	ProfileStatus               string `json:"profileStatus"`
	ProfileClass                string `json:"profileClass"`
	ServiceProviderName         string `json:"serviceProviderName"`
	GenerateSmdsEvent           bool   `json:"generateSmdsEvent"`
	ProfilePolicyRules          []int  `json:"profilePolicyRules"`
}

ProfileListData represents the JSON structure of profile list metadata sent to Stork.

type RequestData

type RequestData struct {
	GtsTestProfileList []ProfileListData `json:"gtsTestProfileList"`
	Eid                string            `json:"eid"`
}

RequestData represents the JSON structure of an eSIM profile request sent to Stork.

Jump to

Keyboard shortcuts

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