Documentation
¶
Index ¶
- Constants
- func AddUIService(engine *gin.Engine)
- func Authenticate(jwtSecret []byte) gin.HandlerFunc
- func Backup(dbInstance *db.Database) gin.HandlerFunc
- func CreateProfile(dbInstance *db.Database) gin.HandlerFunc
- func CreateRoute(dbInstance *db.Database, kernelInt kernel.Kernel) gin.HandlerFunc
- func CreateSubscriber(dbInstance *db.Database) gin.HandlerFunc
- func CreateUser(dbInstance *db.Database) gin.HandlerFunc
- func DeleteProfile(dbInstance *db.Database) gin.HandlerFunc
- func DeleteRoute(dbInstance *db.Database, kernelInt kernel.Kernel) gin.HandlerFunc
- func DeleteSubscriber(dbInstance *db.Database) gin.HandlerFunc
- func DeleteUser(dbInstance *db.Database) gin.HandlerFunc
- func GenerateJWTSecret() ([]byte, error)
- func GetLoggedInUser(dbInstance *db.Database) gin.HandlerFunc
- func GetMetrics() gin.HandlerFunc
- func GetOperator(dbInstance *db.Database) gin.HandlerFunc
- func GetOperatorID(dbInstance *db.Database) gin.HandlerFunc
- func GetOperatorSlice(dbInstance *db.Database) gin.HandlerFunc
- func GetOperatorTracking(dbInstance *db.Database) gin.HandlerFunc
- func GetProfile(dbInstance *db.Database) gin.HandlerFunc
- func GetRadio() gin.HandlerFunc
- func GetRoute(dbInstance *db.Database) gin.HandlerFunc
- func GetStatus(dbInstance *db.Database) gin.HandlerFunc
- func GetSubscriber(dbInstance *db.Database) gin.HandlerFunc
- func GetUser(dbInstance *db.Database) gin.HandlerFunc
- func ListProfiles(dbInstance *db.Database) gin.HandlerFunc
- func ListRadios() gin.HandlerFunc
- func ListRoutes(dbInstance *db.Database) gin.HandlerFunc
- func ListSubscribers(dbInstance *db.Database) gin.HandlerFunc
- func ListUsers(dbInstance *db.Database) gin.HandlerFunc
- func Login(dbInstance *db.Database, jwtSecret []byte) gin.HandlerFunc
- func LookupToken(dbInstance *db.Database, jwtSecret []byte) gin.HandlerFunc
- func NewHandler(dbInstance *db.Database, kernel kernel.Kernel, jwtSecret []byte, mode string, ...) http.Handler
- func RateLimitMiddleware() gin.HandlerFunc
- func Require(allowedRoles ...Role) gin.HandlerFunc
- func RequireAdminOrFirstUser(db *db.Database, jwtSecret []byte) gin.HandlerFunc
- func ResetVisitors()
- func Restore(dbInstance *db.Database) gin.HandlerFunc
- func Tracing(serviceName string) gin.HandlerFunc
- func UpdateOperatorCode(dbInstance *db.Database) gin.HandlerFunc
- func UpdateOperatorHomeNetwork(dbInstance *db.Database) gin.HandlerFunc
- func UpdateOperatorID(dbInstance *db.Database) gin.HandlerFunc
- func UpdateOperatorSlice(dbInstance *db.Database) gin.HandlerFunc
- func UpdateOperatorTracking(dbInstance *db.Database) gin.HandlerFunc
- func UpdateProfile(dbInstance *db.Database) gin.HandlerFunc
- func UpdateSubscriber(dbInstance *db.Database) gin.HandlerFunc
- func UpdateUser(dbInstance *db.Database) gin.HandlerFunc
- func UpdateUserPassword(dbInstance *db.Database) gin.HandlerFunc
- type CreateProfileParams
- type CreateRouteParams
- type CreateSubscriberParams
- type CreateSuccessResponse
- type CreateUserParams
- type GetOperatorHomeNetworkResponse
- type GetOperatorIDResponse
- type GetOperatorResponse
- type GetOperatorSliceResponse
- type GetOperatorTrackingResponse
- type GetProfileResponse
- type GetRadioParams
- type GetRouteResponse
- type GetSubscriberResponse
- type GetUserParams
- type LoginParams
- type LoginResponse
- type LookupTokenResponse
- type PlmnID
- type Role
- type Snssai
- type StatusResponse
- type SuccessResponse
- type SupportedTAI
- type Tai
- type UpdateOperatorCodeParams
- type UpdateOperatorHomeNetworkParams
- type UpdateOperatorIDParams
- type UpdateOperatorSliceParams
- type UpdateOperatorTrackingParams
- type UpdateSubscriberParams
- type UpdateUserParams
- type UpdateUserPasswordParams
- type Visitor
Constants ¶
View Source
const ( LoginAction = "auth_login" LookupTokenAction = "auth_lookup_token" // #nosec G101 )
View Source
const ( GetOperatorAction = "get_operator" GetOperatorSliceAction = "get_operator_slice" GetOperatorTrackingAction = "get_operator_tracking" GetOperatorIDAction = "get_operator_id" GetOperatorHomeNetworkAction = "get_operator_home_network" UpdateOperatorSliceAction = "update_operator_slice" UpdateOperatorTrackingAction = "update_operator_tracking" UpdateOperatorIDAction = "update_operator_id" UpdateOperatorCodeAction = "update_operator_code" UpdateOperatorHomeNetworkAction = "update_operator_home_network" )
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" )
View Source
const ( ListRoutesAction = "list_routes" GetRouteAction = "get_route" CreateRouteAction = "create_route" DeleteRouteAction = "delete_route" )
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" UpdateUserPasswordAction = "update_user_password" )
View Source
const ( NumRequests = 100 RequestsPerTime = time.Second )
View Source
const AuthenticationAction = "user_authentication"
View Source
const BackupAction = "backup_database"
View Source
const GetStatusAction = "get_status"
View Source
const RestoreAction = "restore_database"
View Source
const TokenExpirationTime = time.Hour * 1
Variables ¶
This section is empty.
Functions ¶
func AddUIService ¶ added in v0.0.12
func Authenticate ¶
func Authenticate(jwtSecret []byte) gin.HandlerFunc
func CreateProfile ¶
func CreateProfile(dbInstance *db.Database) gin.HandlerFunc
func CreateRoute ¶ added in v0.0.9
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 DeleteRoute ¶ added in v0.0.9
func DeleteSubscriber ¶
func DeleteSubscriber(dbInstance *db.Database) gin.HandlerFunc
func DeleteUser ¶
func DeleteUser(dbInstance *db.Database) gin.HandlerFunc
func GenerateJWTSecret ¶
func GetLoggedInUser ¶
func GetLoggedInUser(dbInstance *db.Database) gin.HandlerFunc
func GetMetrics ¶
func GetMetrics() gin.HandlerFunc
func GetOperator ¶
func GetOperator(dbInstance *db.Database) gin.HandlerFunc
func GetOperatorID ¶ added in v0.0.12
func GetOperatorID(dbInstance *db.Database) gin.HandlerFunc
func GetOperatorSlice ¶
func GetOperatorSlice(dbInstance *db.Database) gin.HandlerFunc
func GetOperatorTracking ¶
func GetOperatorTracking(dbInstance *db.Database) gin.HandlerFunc
func GetProfile ¶
func GetProfile(dbInstance *db.Database) gin.HandlerFunc
func GetRadio ¶
func GetRadio() gin.HandlerFunc
func GetSubscriber ¶
func GetSubscriber(dbInstance *db.Database) gin.HandlerFunc
func ListProfiles ¶
func ListProfiles(dbInstance *db.Database) gin.HandlerFunc
func ListRadios ¶
func ListRadios() gin.HandlerFunc
func ListRoutes ¶ added in v0.0.9
func ListRoutes(dbInstance *db.Database) gin.HandlerFunc
func ListSubscribers ¶
func ListSubscribers(dbInstance *db.Database) gin.HandlerFunc
func LookupToken ¶
func LookupToken(dbInstance *db.Database, jwtSecret []byte) gin.HandlerFunc
func NewHandler ¶
func RateLimitMiddleware ¶ added in v0.0.11
func RateLimitMiddleware() gin.HandlerFunc
RateLimitMiddleware is a Gin middleware that rate limits incoming requests based on the client IP.
func Require ¶ added in v0.0.10
func Require(allowedRoles ...Role) gin.HandlerFunc
Require checks if the user has the required role to access the resource The user will be allowed to access the resource if their role is in the allowedRoles list
func RequireAdminOrFirstUser ¶
func RequireAdminOrFirstUser(db *db.Database, jwtSecret []byte) gin.HandlerFunc
func ResetVisitors ¶ added in v0.0.11
func ResetVisitors()
func Tracing ¶ added in v0.0.18
func Tracing(serviceName string) gin.HandlerFunc
func UpdateOperatorCode ¶
func UpdateOperatorCode(dbInstance *db.Database) gin.HandlerFunc
func UpdateOperatorHomeNetwork ¶
func UpdateOperatorHomeNetwork(dbInstance *db.Database) gin.HandlerFunc
func UpdateOperatorID ¶ added in v0.0.12
func UpdateOperatorID(dbInstance *db.Database) gin.HandlerFunc
func UpdateOperatorSlice ¶
func UpdateOperatorSlice(dbInstance *db.Database) gin.HandlerFunc
func UpdateOperatorTracking ¶
func UpdateOperatorTracking(dbInstance *db.Database) gin.HandlerFunc
func UpdateProfile ¶
func UpdateProfile(dbInstance *db.Database) gin.HandlerFunc
func UpdateSubscriber ¶
func UpdateSubscriber(dbInstance *db.Database) gin.HandlerFunc
func UpdateUser ¶
func UpdateUser(dbInstance *db.Database) gin.HandlerFunc
func UpdateUserPassword ¶
func UpdateUserPassword(dbInstance *db.Database) 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 CreateRouteParams ¶ added in v0.0.9
type CreateSubscriberParams ¶
type CreateSuccessResponse ¶ added in v0.0.9
type CreateUserParams ¶
type GetOperatorHomeNetworkResponse ¶
type GetOperatorHomeNetworkResponse struct {
PublicKey string `json:"publicKey,omitempty"`
}
type GetOperatorIDResponse ¶ added in v0.0.12
type GetOperatorResponse ¶
type GetOperatorResponse struct { ID GetOperatorIDResponse `json:"id,omitempty"` Slice GetOperatorSliceResponse `json:"slice,omitempty"` Tracking GetOperatorTrackingResponse `json:"tracking,omitempty"` HomeNetwork GetOperatorHomeNetworkResponse `json:"homeNetwork,omitempty"` }
type GetOperatorTrackingResponse ¶
type GetOperatorTrackingResponse struct {
SupportedTacs []string `json:"supportedTacs,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"` ID string `json:"id"` Address string `json:"address"` SupportedTAIs []SupportedTAI `json:"supported_tais"` }
type GetRouteResponse ¶ added in v0.0.9
type GetSubscriberResponse ¶
type GetUserParams ¶
type LoginParams ¶
type LoginResponse ¶
type LoginResponse struct {
Token string `json:"token"`
}
type LookupTokenResponse ¶
type LookupTokenResponse struct {
Valid bool `json:"valid"`
}
type StatusResponse ¶
type SuccessResponse ¶
type SuccessResponse struct {
Message string `json:"message"`
}
type SupportedTAI ¶
type UpdateOperatorCodeParams ¶
type UpdateOperatorCodeParams struct {
OperatorCode string `json:"operatorCode,omitempty"`
}
type UpdateOperatorHomeNetworkParams ¶
type UpdateOperatorHomeNetworkParams struct {
PrivateKey string `json:"privateKey,omitempty"`
}
type UpdateOperatorIDParams ¶ added in v0.0.12
type UpdateOperatorTrackingParams ¶
type UpdateOperatorTrackingParams struct {
SupportedTacs []string `json:"supportedTacs,omitempty"`
}
type UpdateSubscriberParams ¶
type UpdateUserParams ¶
Click to show internal directories.
Click to hide internal directories.