server

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2025 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LoginAction       = "auth_login"
	LookupTokenAction = "auth_lookup_token"
)
View Source
const (
	GetOperatorIdAction      = "get_operator_id"
	UpdateOperatorIdAction   = "update_operator_id"
	UpdateOperatorCodeAction = "update_operator_code"
)
View Source
const (
	ListProfilesAction  = "list_profiles"
	GetProfileAction    = "get_profile"
	CreateProfileAction = "create_profile"
	UpdateProfileAction = "update_profile"
	DeleteProfileAction = "delete_profile"
)
View Source
const (
	ListRadiosAction  = "list_radios"
	GetRadioAction    = "get_radio"
	CreateRadioAction = "create_radio"
	UpdateRadioAction = "update_radio"
	DeleteRadioAction = "delete_radio"
)
View Source
const (
	ListSubscribersAction  = "list_subscribers"
	GetSubscriberAction    = "get_subscriber"
	CreateSubscriberAction = "create_subscriber"
	UpdateSubscriberAction = "update_subscriber"
	DeleteSubscriberAction = "delete_subscriber"
)
View Source
const (
	ListUsersAction       = "list_users"
	GetUserAction         = "get_user"
	GetLoggedInUserAction = "get_logged_in_user"
	CreateUserAction      = "create_user"
	UpdateUserAction      = "update_user"
	DeleteUserAction      = "delete_user"
)
View Source
const AuthenticationAction = "user_authentication"
View Source
const BackupAction = "backup_database"
View Source
const GetStatusAction = "get_status"
View Source
const RestoreAction = "restore_database"

Variables

This section is empty.

Functions

func AddUiService

func AddUiService(engine *gin.Engine)

func Any

func Any(handlerFunc gin.HandlerFunc) gin.HandlerFunc

func Backup

func Backup(dbInstance *db.Database) gin.HandlerFunc

func CreateProfile

func CreateProfile(dbInstance *db.Database) gin.HandlerFunc

func CreateRadio

func CreateRadio(dbInstance *db.Database) gin.HandlerFunc

func CreateSubscriber

func CreateSubscriber(dbInstance *db.Database) gin.HandlerFunc

func CreateUser

func CreateUser(dbInstance *db.Database) gin.HandlerFunc

func DeleteProfile

func DeleteProfile(dbInstance *db.Database) gin.HandlerFunc

func DeleteRadio

func DeleteRadio(dbInstance *db.Database) gin.HandlerFunc

func DeleteSubscriber

func DeleteSubscriber(dbInstance *db.Database) gin.HandlerFunc

func DeleteUser

func DeleteUser(dbInstance *db.Database) gin.HandlerFunc

func GenerateJWTSecret

func GenerateJWTSecret() ([]byte, error)

func GetLoggedInUser

func GetLoggedInUser(dbInstance *db.Database) gin.HandlerFunc

func GetMetrics

func GetMetrics() gin.HandlerFunc

func GetOperatorId

func GetOperatorId(dbInstance *db.Database) gin.HandlerFunc

func GetProfile

func GetProfile(dbInstance *db.Database) gin.HandlerFunc

func GetRadio

func GetRadio(dbInstance *db.Database) gin.HandlerFunc

func GetStatus

func GetStatus(dbInstance *db.Database) gin.HandlerFunc

func GetSubscriber

func GetSubscriber(dbInstance *db.Database) gin.HandlerFunc

func GetUser

func GetUser(dbInstance *db.Database) gin.HandlerFunc

func ListProfiles

func ListProfiles(dbInstance *db.Database) gin.HandlerFunc

func ListRadios

func ListRadios(dbInstance *db.Database) gin.HandlerFunc

func ListSubscribers

func ListSubscribers(dbInstance *db.Database) gin.HandlerFunc

func ListUsers

func ListUsers(dbInstance *db.Database) gin.HandlerFunc

func Login

func Login(dbInstance *db.Database, jwtSecret []byte) gin.HandlerFunc

func LookupToken

func LookupToken(dbInstance *db.Database, jwtSecret []byte) gin.HandlerFunc

func NewHandler

func NewHandler(dbInstance *db.Database, jwtSecret []byte) http.Handler

func Restore

func Restore(dbInstance *db.Database) gin.HandlerFunc

func UpdateOperatorCode

func UpdateOperatorCode(dbInstance *db.Database) gin.HandlerFunc

func UpdateOperatorId

func UpdateOperatorId(dbInstance *db.Database) gin.HandlerFunc

func UpdateProfile

func UpdateProfile(dbInstance *db.Database) gin.HandlerFunc

func UpdateRadio

func UpdateRadio(dbInstance *db.Database) gin.HandlerFunc

func UpdateSubscriber

func UpdateSubscriber(dbInstance *db.Database) gin.HandlerFunc

func UpdateUser

func UpdateUser(dbInstance *db.Database) gin.HandlerFunc

func User

func User(handlerFunc gin.HandlerFunc, jwtSecret []byte) gin.HandlerFunc

func UserOrFirstUser

func UserOrFirstUser(handlerFunc gin.HandlerFunc, db *db.Database, jwtSecret []byte) gin.HandlerFunc

Types

type CreateProfileParams

type CreateProfileParams struct {
	Name string `json:"name"`

	UeIpPool        string `json:"ue-ip-pool,omitempty"`
	Dns             string `json:"dns,omitempty"`
	Mtu             int32  `json:"mtu,omitempty"`
	BitrateUplink   string `json:"bitrate-uplink,omitempty"`
	BitrateDownlink string `json:"bitrate-downlink,omitempty"`
	Var5qi          int32  `json:"var5qi,omitempty"`
	PriorityLevel   int32  `json:"priority-level,omitempty"`
}

type CreateRadioParams

type CreateRadioParams struct {
	Name string `json:"name"`
	Tac  string `json:"tac"`
}

type CreateSubscriberParams

type CreateSubscriberParams struct {
	Imsi           string `json:"imsi"`
	Key            string `json:"key"`
	SequenceNumber string `json:"sequenceNumber"`
	ProfileName    string `json:"profileName"`
}

type CreateUserParams

type CreateUserParams struct {
	Email    string `json:"email"`
	Password string `json:"password"`
}

type GetOperatorIdResponse

type GetOperatorIdResponse struct {
	Mcc string `json:"mcc,omitempty"`
	Mnc string `json:"mnc,omitempty"`
}

type GetProfileResponse

type GetProfileResponse struct {
	Name string `json:"name"`

	UeIpPool        string `json:"ue-ip-pool,omitempty"`
	Dns             string `json:"dns,omitempty"`
	Mtu             int32  `json:"mtu,omitempty"`
	BitrateUplink   string `json:"bitrate-uplink,omitempty"`
	BitrateDownlink string `json:"bitrate-downlink,omitempty"`
	Var5qi          int32  `json:"var5qi,omitempty"`
	PriorityLevel   int32  `json:"priority-level,omitempty"`
}

type GetRadioParams

type GetRadioParams struct {
	Name string `json:"name"`
	Tac  string `json:"tac"`
}

type GetSubscriberResponse

type GetSubscriberResponse struct {
	Imsi           string `json:"imsi"`
	IpAddress      string `json:"ipAddress"`
	Opc            string `json:"opc"`
	SequenceNumber string `json:"sequenceNumber"`
	Key            string `json:"key"`
	ProfileName    string `json:"profileName"`
}

type GetUserParams

type GetUserParams struct {
	Email string `json:"email"`
}

type LoginParams

type LoginParams struct {
	Email    string `json:"email"`
	Password string `json:"password"`
}

type LoginResponse

type LoginResponse struct {
	Token string `json:"token"`
}

type LookupTokenResponse

type LookupTokenResponse struct {
	Valid bool `json:"valid"`
}

type StatusResponse

type StatusResponse struct {
	Version     string `json:"version"`
	Initialized bool   `json:"initialized"`
}

type SuccessResponse

type SuccessResponse struct {
	Message string `json:"message"`
}

type UpdateOperatorCodeParams

type UpdateOperatorCodeParams struct {
	OperatorCode string `json:"operatorCode,omitempty"`
}

type UpdateOperatorIdParams

type UpdateOperatorIdParams struct {
	Mcc string `json:"mcc,omitempty"`
	Mnc string `json:"mnc,omitempty"`
}

type UpdateSubscriberParams

type UpdateSubscriberParams struct {
	Imsi        string `json:"imsi"`
	ProfileName string `json:"profileName"`
}

Jump to

Keyboard shortcuts

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