Documentation ¶
Index ¶
- type APIKey
- type CourseDataResponse
- type CourseDataResult
- type Event
- type EventResult
- type FieldValidationError
- type FieldValidationErrors
- type GameProfileMetaDataResponse
- type GameProfileMetadata
- type GitConfig
- type JSONEvent
- type LearningHistoryResponse
- type LearningHistoryResult
- type LegacyAuthResponse
- type LoginRequest
- type MockClient
- type Module
- type MultiplayerServerConfig
- type MultiplayerServerTrigger
- type MultiplayerServerVersion
- type OldAPIClient
- type Org
- type OrgModule
- type OrgResponse
- type PrimaryAPIClient
- func (p *PrimaryAPIClient) ActiveUserID() int
- func (p *PrimaryAPIClient) CreateWebhook(input Webhook) error
- func (p *PrimaryAPIClient) DeleteWebhook(id int) error
- func (p *PrimaryAPIClient) DeployMultiplayerServerVersion(moduleID int, image, semanticVersion string) (*resty.Response, error)
- func (p *PrimaryAPIClient) GetMatchmakingProfiles() ([]*GameProfileMetadata, error)
- func (p *PrimaryAPIClient) GetWebhooks(orgID int) ([]Webhook, error)
- func (p *PrimaryAPIClient) Login(username, password string) error
- func (p *PrimaryAPIClient) UpdateMultiplayerServerVersion(versionID int, image string) (*resty.Response, error)
- type Result
- type User
- type Webhook
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CourseDataResponse ¶
type CourseDataResponse struct { Message string `json:"message"` StatusCode int `json:"statusCode"` Data []CourseDataResult `json:"data"` Errors *FieldValidationErrors `json:"errors"` Error bool `json:"error"` }
type CourseDataResult ¶
type CourseDataResult struct { ID int `json:"id"` Name string `json:"name"` Description string `json:"description"` ImageName interface{} `json:"imageName"` ImagePath interface{} `json:"imagePath"` ThumbnailPath string `json:"thumbnailPath"` PdfPath interface{} `json:"pdfPath"` PdfName interface{} `json:"pdfName"` ShortDesc string `json:"shortDesc"` LongDesc string `json:"longDesc"` Details interface{} `json:"details"` Public bool `json:"public"` Demo bool `json:"demo"` Status string `json:"status"` Deleted bool `json:"deleted"` Industry string `json:"industry"` DistributorID int `json:"distributorId"` Developer string `json:"developer"` UpdatedBy string `json:"updatedBy"` IsMultiplayer bool `json:"isMultiplayer"` PassingScoreEnabled bool `json:"passingScoreEnabled"` OrgModule []OrgModule `json:"orgModule"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` }
type EventResult ¶
type FieldValidationError ¶
type FieldValidationErrors ¶
type FieldValidationErrors struct { OrgID *FieldValidationError `json:"orgID"` StartDate *FieldValidationError `json:"startDate"` EndDate *FieldValidationError `json:"endDate"` }
type GameProfileMetaDataResponse ¶
type GameProfileMetaDataResponse struct { Error bool `json:"error"` StatusCode int `json:"statusCode"` Message string `json:"message"` Profiles []*GameProfileMetadata `json:"profiles"` CreatedBy string `json:"createdBy"` UpdatedBy string `json:"updatedBy"` CreatedAt string `json:"createdAt"` UpdatedAt string `json:"updatedAt"` }
type GameProfileMetadata ¶
type GameProfileMetadata struct { OrgID int `json:"orgId"` Config MultiplayerServerConfig `json:"config"` ServerVersion MultiplayerServerVersion `json:"serverVersion"` CreatedBy string `json:"createdBy"` UpdatedBy string `json:"updatedBy"` CreatedAt string `json:"createdAt"` UpdatedAt string `json:"updatedAt"` }
type JSONEvent ¶
type JSONEvent struct { ID string `json:"id,omitempty"` SessionDuration float64 `json:"sessionDuration,omitempty"` LessonStatus *string `json:"lessonStatus,omitempty"` ModuleName string `json:"moduleName,omitempty"` Actor struct { Name *string `json:"name,omitempty"` Mbox *string `json:"mBox,omitempty"` } `json:"actor,omitempty"` Verb struct { ID *string `json:"id,omitempty"` Display struct { EN *string `json:"en,omitempty"` } `json:"display,omitempty"` } `json:"verb,omitempty"` Object *struct { ID *string `json:"id,omitempty"` } `json:"object,omitempty"` Result *Result `json:"result,omitempty"` Context *struct { Registration string `json:"registration,omitempty"` Revision string `json:"revision,omitempty"` Extensions map[string]interface{} `json:"extensions,omitempty"` } `json:"context,omitempty"` Score *float64 `json:"score,omitempty"` ScoreMin *float64 `json:"scoreMin,omitempty"` ScoreMax *float64 `json:"scoreMax,omitempty"` ScoreScaled *float64 `json:"scoreScaled,omitempty"` Success *bool `json:"success,omitempty"` }
type LearningHistoryResponse ¶
type LearningHistoryResponse struct { Message string `json:"message"` StatusCode int `json:"statusCode"` Data []LearningHistoryResult `json:"data"` Errors *FieldValidationErrors `json:"errors"` Error bool `json:"error"` }
type LearningHistoryResult ¶
type LegacyAuthResponse ¶
type LoginRequest ¶
type MockClient ¶
type MockClient struct { NumCalledLogin int LoginError error NumCalledCreateWebhook int CreateWebhookError error NumCalledGetWebhooks int GetWebhooksError error NumCalledDeleteWebhook int DeleteWebhookError error }
func (*MockClient) CreateWebhook ¶
func (m *MockClient) CreateWebhook(webhook Webhook) error
func (*MockClient) DeleteWebhook ¶
func (m *MockClient) DeleteWebhook(id int) error
func (*MockClient) GetWebhooks ¶
func (m *MockClient) GetWebhooks(orgID int) ([]Webhook, error)
func (*MockClient) Login ¶
func (m *MockClient) Login(username, password string) error
type MultiplayerServerConfig ¶
type MultiplayerServerConfig struct { ID int `json:"id"` Capacity int `json:"capacity,omitempty"` StandbyReplicas string `json:"standbyReplicas,omitempty"` Disabled bool `json:"disabled,omitempty"` ModuleID int `json:"moduleId,omitempty"` Module *Module `json:"module,omitempty"` ServerVersions []*MultiplayerServerVersion `json:"serverVersions,omitempty"` CreatedBy string `json:"createdBy,omitempty"` UpdatedBy string `json:"updatedBy,omitempty"` }
type MultiplayerServerTrigger ¶
type MultiplayerServerTrigger struct { ID int `json:"id,omitempty"` Revision string `json:"revision,omitempty"` Dockerfile string `json:"dockerfile,omitempty"` Context string `json:"context,omitempty"` Config string `json:"config,omitempty"` Module *Module `json:"module,omitempty"` ModuleID int `json:"moduleId,omitempty"` CreatedBy string `json:"createdBy,omitempty"` UpdatedBy string `json:"updatedBy,omitempty"` CreatedAt string `json:"createdAt,omitempty"` UpdatedAt string `json:"updatedAt,omitempty"` }
type MultiplayerServerVersion ¶
type MultiplayerServerVersion struct { ID int `json:"id,omitempty" graphql:"id"` Engine string `json:"engine,omitempty" graphql:"engine"` Status string `json:"status,omitempty" graphql:"status"` ImageRegistry string `json:"imageRegistry" graphql:"imageRegistry"` SemanticVersion string `json:"semanticVersion,omitempty" graphql:"semanticVersion"` FileLink string `json:"fileLink,omitempty" graphql:"fileLink"` ModuleID int `json:"moduleId,omitempty" graphql:"moduleId"` Module *Module `json:"module,omitempty" graphql:"module"` CreatedBy string `json:"createdBy" graphql:"createdBy"` UpdatedBy string `json:"updatedBy" graphql:"updatedBy"` }
type OldAPIClient ¶
type OrgModule ¶
type OrgModule struct { ID int `json:"id"` ModuleID int `json:"moduleId"` OrgID int `json:"orgId"` Lifetime bool `json:"lifetime"` ExpirationDate time.Time `json:"expirDate"` LearningType string `json:"learningType"` CompleteStatus string `json:"completeStatus"` ExternalID string `json:"externalId"` }
type OrgResponse ¶
type OrgResponse struct { Error bool `json:"error"` Message string `json:"message"` StatusCode *int `json:"statusCode"` Orgs *[]Org `json:"orgs"` Errors *FieldValidationErrors `json:"errors"` }
type PrimaryAPIClient ¶
type PrimaryAPIClient struct {
abstractClient.AbstractServiceClient
}
PrimaryAPIClient is a struct for the primary API that contains an abstract client
func NewClient ¶
func NewClient(config urlfinder.ClientConfig) *PrimaryAPIClient
NewClient is a function that returns a AbstractServiceClient
func NewClientWithBasicAuth ¶
func NewClientWithBasicAuth(username, password string, config urlfinder.ClientConfig) (*PrimaryAPIClient, error)
NewClientWithBasicAuth is a function that returns a AbstractServiceClient with basic auth performed
func (*PrimaryAPIClient) ActiveUserID ¶
func (p *PrimaryAPIClient) ActiveUserID() int
func (*PrimaryAPIClient) CreateWebhook ¶
func (p *PrimaryAPIClient) CreateWebhook(input Webhook) error
CreateWebhook creates a webhook with the given description and endpoint.
func (*PrimaryAPIClient) DeleteWebhook ¶
func (p *PrimaryAPIClient) DeleteWebhook(id int) error
DeleteWebhook deletes a webhook with the given ID.
func (*PrimaryAPIClient) DeployMultiplayerServerVersion ¶
func (p *PrimaryAPIClient) DeployMultiplayerServerVersion(moduleID int, image, semanticVersion string) (*resty.Response, error)
func (*PrimaryAPIClient) GetMatchmakingProfiles ¶
func (p *PrimaryAPIClient) GetMatchmakingProfiles() ([]*GameProfileMetadata, error)
func (*PrimaryAPIClient) GetWebhooks ¶
func (p *PrimaryAPIClient) GetWebhooks(orgID int) ([]Webhook, error)
GetWebhooks returns a list of webhooks.
func (*PrimaryAPIClient) Login ¶
func (p *PrimaryAPIClient) Login(username, password string) error
Login performs a login request to the API
func (*PrimaryAPIClient) UpdateMultiplayerServerVersion ¶
func (p *PrimaryAPIClient) UpdateMultiplayerServerVersion(versionID int, image string) (*resty.Response, error)
type Result ¶
type Result struct { Completion bool `json:"completion,omitempty"` Success bool `json:"success,omitempty"` Duration string `json:"duration,omitempty"` Score *struct { Scaled float32 `json:"scaled,omitempty"` Raw float64 `json:"raw,omitempty"` Min float32 `json:"min,omitempty"` Max float32 `json:"max,omitempty"` } `json:"score,omitempty"` }
type User ¶
type User struct { ID int `json:"id,omitempty"` Role string `json:"role,omitempty"` OrgID int `json:"orgId,omitempty"` Org Org `json:"org,omitempty"` Username string `json:"username,omitempty"` Password string `json:"-"` FirstName string `json:"firstName,omitempty"` LastName string `json:"lastName,omitempty"` Email string `json:"email,omitempty"` ExternalID string `json:"externalId,omitempty"` CreatedAt time.Time `json:"createdAt,omitempty"` UpdatedAt time.Time `json:"updatedAt,omitempty"` }
Click to show internal directories.
Click to hide internal directories.