Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInternalServerError returns a new Internal Server Error ErrInternalServerError = errors.New("Internal Server Error") // ErrNotFound returns a new Not Found Error ErrNotFound = errors.New("Your requested Item is not found") // ErrConflict returns a new Conflict error ErrConflict = errors.New("Your Item already exists") // ErrBadParamInput returns a Bad Parameter Input Error ErrBadParamInput = errors.New("Given Param is not valid") ErrUnauthorized = errors.New("Missing or Invalid authentication token") // ErrDatabaseError returns a New Database Error ErrDatabaseError = errors.New("An error has occurred in the database") )
var error model to map to http errors
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct { ID string `json:"id"` AppID string `json:"appId"` AppName string `json:"appName,omitempty"` NumOfDeployedVersions *int `json:"numOfDeployedVersions,omitempty"` NumOfCurrentInstalls *int `json:"numOfCurrentInstalls,omitempty"` NumOfAppLaunches *int `json:"numOfAppLaunches,omitempty"` DeployedVersions *[]Version `json:"deployedVersions,omitempty"` DeletedAt string `json:"deletedAt,omitempty"` }
App is the model struct for apps swagger:model App
func NewAppByNameAndAppID ¶
NewAppByNameAndAppID will create a new App object based on the name and appId which indeed are the only values according to the business that can be used/provided in order to the service create an app. This will be used in the systems which would consume the REST API to create new apps. ( E.g Operator )
type Device ¶
type Device struct { ID string `json:"id"` VersionID string `json:"versionId"` Version string `json:"version"` AppID string `json:"appId"` DeviceID string `json:"deviceId"` DeviceVersion string `json:"deviceVersion"` DeviceType string `json:"deviceType"` }
Device model swagger:model Device
type Version ¶
type Version struct { ID string `json:"id"` Version string `json:"version"` AppID string `json:"appId"` Disabled bool `json:"disabled"` DisabledMessage string `json:"disabledMessage"` NumOfCurrentInstalls int64 `json:"numOfCurrentInstalls,omitempty"` NumOfAppLaunches int64 `json:"numOfAppLaunches,omitempty"` LastLaunchedAt string `json:"lastLaunchedAt,omitempty"` Devices []Device `json:"devices,omitempty"` }
Version model swagger:model Version
Click to show internal directories.
Click to hide internal directories.