platform

package
v0.1.100 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2025 License: MIT Imports: 20 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMultipartGQLWriter

func NewMultipartGQLWriter(req GraphQLRequestPayload) (*bytes.Buffer, *multipart.Writer, error)

func NewMultipartWriter

func NewMultipartWriter(req interface{}) (*bytes.Buffer, *multipart.Writer, error)

Types

type APIKey

type APIKey struct {
	ID     int    `json:"id,omitempty"`
	Key    string `json:"key,omitempty"`
	UserID int    `json:"userId,omitempty"`
	User   *User  `json:"user,omitempty"`

	CreatedAt time.Time `json:"createdAt,omitempty"`
	UpdatedAt time.Time `json:"updatedAt,omitempty"`
}

type APIKeyQueryParams

type APIKeyQueryParams struct {
	UserID *int `json:"userId" graphql:"userId"`
}

type Asset

type Asset struct {
	ID   int      `json:"id,omitempty"`
	Name string   `json:"name,omitempty" yaml:"name,omitempty"`
	Type string   `json:"type,omitempty"`
	Tags []string `json:"tags,omitempty"`

	ModuleID int            `json:"moduleId,omitempty"`
	Module   *Module        `json:"module,omitempty"`
	Versions []AssetVersion `json:"versions,omitempty" yaml:"versions,omitempty"`

	Checksum     string `json:"checksum,omitempty"`
	DownloadLink string `json:"downloadLink,omitempty"`

	CreatedAt time.Time `json:"createdAt,omitempty"`
	UpdatedAt time.Time `json:"updatedAt,omitempty"`
}

type AssetParams

type AssetParams struct {
	ModuleID         int      `json:"moduleId,omitempty"`
	ExternalModuleID string   `json:"externalModuleId,omitempty"`
	Name             string   `json:"name,omitempty"`
	Type             string   `json:"type,omitempty"`
	Status           string   `json:"status,omitempty"`
	LanguageCode     string   `json:"languageCode,omitempty"`
	Tags             []string `json:"tags,omitempty"`
	WithVersions     bool     `json:"withVersions,omitempty"`
	WithChecksum     bool     `json:"withChecksum,omitempty"`
}

type AssetVersion

type AssetVersion struct {
	ID            int    `json:"id,omitempty"`
	Status        string `json:"status,omitempty"`
	LanguageCode  string `json:"languageCode,omitempty"`
	Language      string `json:"language,omitempty"`
	FileLink      string `json:"fileLink,omitempty"`
	LocalFilePath string `json:"-"`

	AssetID int    `json:"assetId,omitempty"`
	Asset   *Asset `json:"asset,omitempty"`

	CreatedAt time.Time `json:"createdAt,omitempty"`
	UpdatedAt time.Time `json:"updatedAt,omitempty"`
}

type AssetsResponse

type AssetsResponse struct {
	Message string  `json:"message"`
	Error   string  `json:"error"`
	Assets  []Asset `json:"assets"`
}

type Client

type Client interface {
	abstract.AbstractClient

	CheckAuth(ctx context.Context) (User, error)
	ActiveUserID() int
	ActiveOrgID() int

	GetUser(ctx context.Context, id int) (*User, error)
	GetUserByUsername(ctx context.Context, username string) (*User, error)
	CreateUser(ctx context.Context, user *User) error
	UpdateUser(ctx context.Context, user *User) error
	DeleteUser(ctx context.Context, id int) error

	GetAPIKeys(ctx context.Context, params *APIKeyQueryParams) ([]APIKey, error)
	CreateAPIKey(ctx context.Context, input APIKey) (*APIKey, error)
	DeleteAPIKey(ctx context.Context, id int) error

	GetWebhooks(ctx context.Context, params *WebhookParams) ([]Webhook, error)
	GetWebhook(ctx context.Context, id int) (*Webhook, error)
	CreateWebhook(ctx context.Context, input Webhook) (*Webhook, error)
	UpdateWebhook(ctx context.Context, input Webhook) (*Webhook, error)
	DeleteWebhook(ctx context.Context, id int) error

	GetRoles(ctx context.Context) ([]Role, error)

	// GetPlatforms retrieves platforms from the platform using the GraphQL interface
	GetPlatforms(ctx context.Context) ([]Platform, error)
	// GetControlTypes retrieves control types from the platform using the GraphQL interface
	GetControlTypes(ctx context.Context) ([]ControlType, error)

	// GetModules retrieves modules from the platform using the GraphQL interface
	GetModules(ctx context.Context, params ...ModuleParams) ([]Module, error)
	// CreateModuleVersion retrieves a module from the platform using the GraphQL interface
	CreateModuleVersion(ctx context.Context, input ModuleVersion) (*ModuleVersion, error)

	// GetOrgs retrieves orgs from the platform using the GraphQL interface
	GetOrgs(ctx context.Context, params ...*OrgParams) ([]Org, error)
	// GetOrg retrieves an org from the platform using the GraphQL interface
	GetOrg(ctx context.Context, id int) (*Org, error)
	// CreateOrg creates an org on the platform using the GraphQL interface
	CreateOrg(ctx context.Context, org Org) (*Org, error)
	// UpdateOrg updates an org on the platform using the GraphQL interface
	UpdateOrg(ctx context.Context, org Org) (*Org, error)
	// DeleteOrg deletes an org on the platform using the GraphQL interface
	DeleteOrg(ctx context.Context, id int) error

	// GetAsset retrieves an asset from the platform using the GraphQL interface
	GetAsset(ctx context.Context, id int) (*Asset, error)
	// GetAssets retrieves assets from the platform using the GraphQL interface
	GetAssets(ctx context.Context, params AssetParams) ([]Asset, error)
	// CreateAsset creates an asset on the platform using the GraphQL interface
	CreateAsset(ctx context.Context, asset *Asset) error
	// CreateAssetVersion creates an asset version on the platform using the GraphQL interface
	CreateAssetVersion(ctx context.Context, assetVersion *AssetVersion) error
	// UpdateAssetVersion updates an asset version on the platform using the GraphQL interface
	UpdateAssetVersion(ctx context.Context, assetVersion *AssetVersion) error

	// PostAsset posts an asset to the platform using the REST API
	PostAsset(ctx context.Context, assetVersion *AssetVersion) error
	// RetrieveAssets retrieves assets from the platform using the REST API
	RetrieveAssets(ctx context.Context, params AssetParams) ([]Asset, error)

	// GetSession retrieves a session from the platform using the GraphQL interface
	GetSession(ctx context.Context, id int) (*Session, error)
	// CreateSession creates a session on the platform using the GraphQL interface
	CreateSession(ctx context.Context, session *Session) error
	// UpdateSession updates a session on the platform using the GraphQL interface
	UpdateSession(ctx context.Context, session Session) (*Session, error)
	// CreateEvent creates an event on the platform using the GraphQL interface
	CreateEvent(ctx context.Context, event *Event) error

	// GetMultiplayerServerConfigs retrieves multiplayer server configs from the platform using the GraphQL interface
	GetMultiplayerServerConfigs(ctx context.Context, params *MultiplayerServerConfigParams) ([]MultiplayerServerConfigQueryParams, error)
	// GetMultiplayerServerVersions retrieves multiplayer server versions from the platform using the GraphQL interface
	GetMultiplayerServerVersions(ctx context.Context, params *MultiplayerServerVersionParams) ([]MultiplayerServerVersion, error)
	// GetMultiplayerServerVersionsWithConfig retrieves multiplayer server versions with config from the platform using the GraphQL interface
	GetMultiplayerServerVersionsWithConfig(ctx context.Context, params *MultiplayerServerVersionParams) ([]MultiplayerServerVersion, error)
	// GetMultiplayerServerVersion retrieves a multiplayer server version from the platform using the GraphQL interface
	GetMultiplayerServerVersion(ctx context.Context, id int) (*MultiplayerServerVersion, error)
	// CreateMultiplayerServerVersion creates a multiplayer server version on the platform using the GraphQL interface
	CreateMultiplayerServerVersion(ctx context.Context, input MultiplayerServerVersion) (*MultiplayerServerVersion, error)
	// UpdateMultiplayerServerVersion updates a multiplayer server version on the platform using the GraphQL interface
	UpdateMultiplayerServerVersion(ctx context.Context, input MultiplayerServerVersion) (*MultiplayerServerVersion, error)

	// GetLearningHistoryRecords retrieves success factors learning history records from the platform using the GraphQL interface
	GetLearningHistoryRecords(ctx context.Context, params LearningHistoryParams) ([]LearningHistory, error)
	// GetCourseData retrieves success factors course data from the platform using the GraphQL interface
	GetCourseDataRecords(ctx context.Context, orgID int) ([]CourseData, error)
	// GetOrgSuccessFactors retrieves success factors org success factors from the platform using the GraphQL interface
	GetOrgSuccessFactors(ctx context.Context) ([]OrgSuccessFactor, error)

	// GetExpiringModules retrieves expiring modules from the platform using the GraphQL interface
	GetExpiringModules(ctx context.Context) ([]ExpiringModule, error)
}

func NewClient

func NewClient(config urlfinder.ClientConfig) Client

NewClient is a function that returns a clientImpl

func NewClientWithBasicAuth

func NewClientWithBasicAuth(username, password string, config urlfinder.ClientConfig) (Client, error)

NewClientWithBasicAuth is a function that returns a clientImpl with basic auth performed

type ControlType

type ControlType struct {
	ID   int    `json:"id,omitempty"`
	Name string `json:"name,omitempty"`
}

type CourseData

type CourseData struct {
	ID                  int    `json:"id"`
	Name                string `json:"name"`
	Description         string `json:"description"`
	ImageName           string `json:"imageName"`
	ImagePath           string `json:"imagePath"`
	ThumbnailPath       string `json:"thumbnailPath"`
	PDFPath             string `json:"pdfPath"`
	PDFName             string `json:"pdfName"`
	ShortDesc           string `json:"shortDesc"`
	LongDesc            string `json:"longDesc"`
	Details             string `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"`
	ExternalID          string `json:"externalId"`
	LearningType        string `json:"learningType"`
	CompleteStatus      string `json:"completeStatus"`
	CreatedAt           string `json:"createdAt"`
	UpdatedAt           string `json:"updatedAt"`
}

type CreateAPIKeyResponse

type CreateAPIKeyResponse struct {
	APIKey APIKey `json:"createApiKey"`
}

type CreateAssetResponse

type CreateAssetResponse struct {
	Asset Asset `json:"createAsset"`
}

type CreateAssetVersionResponse

type CreateAssetVersionResponse struct {
	AssetVersion AssetVersion `json:"createAssetVersion"`
}

type CreateEventResponse

type CreateEventResponse struct {
	Event Event `json:"createEvent"`
}

type CreateModuleResponse

type CreateModuleResponse struct {
	Module Module `json:"createModule"`
}

type CreateModuleVersionResponse

type CreateModuleVersionResponse struct {
	ModuleVersion ModuleVersion `json:"createModuleVersion"`
}

type CreateOrgResponse

type CreateOrgResponse struct {
	Org Org `json:"createOrg"`
}

type CreateSessionResponse

type CreateSessionResponse struct {
	Session Session `json:"createSession"`
}

type CreateUserResponse

type CreateUserResponse struct {
	User User `json:"createUser"`
}

type CreateWebhookResponse

type CreateWebhookResponse struct {
	Webhook Webhook `json:"createWebhook"`
}

type DeleteAPIKeyResponse

type DeleteAPIKeyResponse struct {
	Success bool `json:"deleteApiKey"`
}

type DeleteOrgResponse

type DeleteOrgResponse struct {
	Success bool `json:"deleteOrg"`
}

type DeleteUserResponse

type DeleteUserResponse struct {
	Success bool `json:"deleteUser"`
}

type DeleteWebhookResponse

type DeleteWebhookResponse struct {
	Success bool `json:"deleteWebhook"`
}

type Error

type Error struct {
	Path      []string `json:"path"`
	Message   string   `json:"message"`
	Locations []struct {
		Line int `json:"line"`
	}
}

type Event

type Event struct {
	ID          int                    `json:"id,omitempty"`
	SessionID   *int                   `json:"sessionId,omitempty"`
	SessionUUID *string                `json:"sessionUuid,omitempty"`
	Session     *Session               `json:"session,omitempty"`
	Type        string                 `json:"type,omitempty"`
	Payload     string                 `json:"payload,omitempty"`
	PayloadMap  map[string]interface{} `json:"-"`

	CreatedAt time.Time `json:"createdAt,omitempty"`
	UpdatedAt time.Time `json:"updatedAt,omitempty"`
}

type EventResponse

type EventResponse struct {
	Event Event `json:"event"`
}

type EventResult

type EventResult struct {
	Success    *bool   `json:"success,omitempty"`
	Completion *bool   `json:"completion,omitempty"`
	Duration   *string `json:"duration,omitempty"`
}

type ExpiringModule

type ExpiringModule struct {
	OrgModuleID int       `json:"orgModuleId"`
	ExpiresAt   time.Time `json:"expiresAt"`
	ModuleName  string    `json:"moduleName"`
	Description string    `json:"description"`
	ShortDesc   string    `json:"shortDesc"`
	OrgID       int       `json:"orgId"`
	OrgName     string    `json:"orgName"`
	Type        string    `json:"type"`
}

type GetAPIKeysResponse

type GetAPIKeysResponse struct {
	APIKeys []APIKey `json:"apiKeys"`
}

type GetAssetResponse

type GetAssetResponse struct {
	Asset Asset `json:"asset"`
}

type GetAssetsResponse

type GetAssetsResponse struct {
	Assets []Asset `json:"assets"`
}

type GetControlTypesResponse

type GetControlTypesResponse struct {
	ControlTypes []ControlType `json:"controls,omitempty"`
}

type GetCourseDataResponse

type GetCourseDataResponse struct {
	CourseDataRecords []CourseData `json:"courseData"`
}

type GetExpiringModulesResponse

type GetExpiringModulesResponse struct {
	ExpiringModules []ExpiringModule `json:"expiringModules"`
}

type GetLearningHistoryResponse

type GetLearningHistoryResponse struct {
	LearningHistoryRecords []LearningHistory `json:"learningHistory"`
}

type GetModulesResponse

type GetModulesResponse struct {
	Modules []Module `json:"modules"`
}

type GetOrgResponse

type GetOrgResponse struct {
	Org Org `json:"org"`
}

type GetOrgsResponse

type GetOrgsResponse struct {
	Orgs []Org `json:"orgs"`
}

type GetPlatformsResponse

type GetPlatformsResponse struct {
	Platforms []Platform `json:"platforms,omitempty"`
}

type GetRolesResponse

type GetRolesResponse struct {
	Roles []Role `json:"roles"`
}

type GetUserResponse

type GetUserResponse struct {
	User User `json:"user"`
}

type GetWebhookResponse

type GetWebhookResponse struct {
	Webhook Webhook `json:"webhook"`
}

type GetWebhooksResponse

type GetWebhooksResponse struct {
	Webhooks []Webhook `json:"webhooks"`
}

type GitConfig

type GitConfig struct {
	Provider string `json:"provider,omitempty"`
	OrgName  string `json:"orgName,omitempty"`
	RepoName string `json:"repoName,omitempty"`
}

type GraphQLRequestPayload

type GraphQLRequestPayload struct {
	Query         string                 `json:"query"`
	Variables     map[string]interface{} `json:"variables,omitempty"`
	OperationName string                 `json:"operationName,omitempty"`
}

type GraphQLResponse

type GraphQLResponse struct {
	Messages []string        `json:"messages"`
	Errors   []Error         `json:"errors"`
	Data     json.RawMessage `json:"data"`
}

type LearningHistory

type LearningHistory struct {
	ID                   int     `json:"id"`
	UserID               int     `json:"userId"`
	ModuleID             int     `json:"moduleId"`
	OrgID                int     `json:"orgId"`
	UserEmail            string  `json:"userEmail"`
	ModuleExternalID     string  `json:"moduleExternalId"`
	ModuleLearningType   string  `json:"moduleLearningType"`
	ModuleCompleteStatus string  `json:"moduleCompleteStatus"`
	Score                float64 `json:"score"`
	SessionDuration      int     `json:"sessionDuration"`
	CreatedAt            string  `json:"createdAt"`
}

type LearningHistoryParams

type LearningHistoryParams struct {
	OrgID     int       `json:"orgId"`
	StartDate time.Time `json:"startDate"`
	EndDate   time.Time `json:"endDate"`
}

type LoginRequest

type LoginRequest struct {
	Login    string `json:"login"`
	Password string `json:"password"`
}

type LoginResponse

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

type MockClient

type MockClient struct {
	abstract.MockAbstractClient

	NumCalledGetUser int
	GetUserResponse  *User
	GetUserError     error

	NumCalledGetUserByUsername int
	GetUserByUsernameError     error

	NumCalledGetUsers int
	GetUsersError     error

	NumCalledCreateUser int
	CreateUserError     error

	NumCalledUpdateUser int
	UpdateUserError     error

	NumCalledDeleteUser int
	DeleteUserError     error

	NumCalledGetRoles int
	GetRolesError     error

	NumCalledGetOrgs int
	GetOrgsError     error

	NumCalledGetOrg int
	GetOrgError     error

	NumCalledCreateOrg int
	CreateOrgError     error

	NumCalledUpdateOrg int
	UpdateOrgError     error

	NumCalledDeleteOrg int
	DeleteOrgError     error

	NumCalledGetWebhooks int
	GetWebhooksError     error

	NumCalledGetWebhook int
	GetWebhookError     error

	NumCalledCreateWebhook int
	CreateWebhookError     error

	NumCalledUpdateWebhook int
	UpdateWebhookError     error

	NumCalledDeleteWebhook int
	DeleteWebhookError     error

	NumCalledGetModules int
	GetModulesEmpty     bool
	GetModulesError     error

	NumCalledGetAPIKeys int
	GetAPIKeysEmpty     bool
	GetAPIKeysError     error

	NumCalledCreateAPIKey int
	CreateAPIKeyError     error

	NumCalledDeleteAPIKey int
	DeleteAPIKeyError     error

	NumCalledGetSession int
	GetSessionError     error

	CalledGetAssetWith []*Asset
	GetAssetReturns    *Asset
	GetAssetError      error

	CalledGetAssetsWith []*AssetParams
	GetAssetsReturns    []Asset
	GetAssetsError      error

	CalledCreateAssetWith []*Asset
	CreateAssetError      error

	CalledCreateAssetVersionWith []*AssetVersion
	CreateAssetVersionError      error

	CalledUpdateAssetVersionWith []AssetVersion
	UpdateAssetVersionError      error

	CalledPostAssetWith []AssetVersion
	PostAssetError      error

	CalledRetrieveAssetsWith []AssetParams
	RetrieveAssetsReturns    []Asset
	RetrieveAssetsError      error

	CalledCreateSessionWith []*Session
	CreateSessionError      error

	CalledUpdateSessionWith []*Session
	UpdateSessionError      error

	CalledCreateEventWith []*Event
	CreateEventError      error

	NumCalledGetPlatforms int
	GetPlatformsError     error

	NumCalledGetControlTypes int
	GetControlTypesError     error

	NumCalledCreateModuleVersion int
	CreateModuleVersionError     error

	NumCalledGetMultiplayerServerConfigs     int
	GetMultiplayerServerConfigsError         error
	GetMultiplayerServerConfigsEmpty         bool
	GetMultiplayerServerConfigsEmptyVersions bool

	NumCalledGetMultiplayerServerVersionsWithConfig int
	GetMultiplayerServerVersionsWithConfigError     error
	GetMultiplayerServerVersionsWithConfigEmpty     bool

	NumCalledGetMultiplayerServerVersions int
	GetMultiplayerServerVersionsError     error
	GetMultiplayerServerVersionsEmpty     bool
	GetMultiplayerServerVersionsResponse  []MultiplayerServerVersion

	NumCalledGetMultiplayerServerVersion int
	GetMultiplayerServerVersionError     error
	GetMultiplayerServerVersionEmpty     bool

	NumCalledCreateMultiplayerServerVersion int
	CreateMultiplayerServerVersionError     error

	NumCalledUpdateMultiplayerServerVersion int
	UpdateMultiplayerServerVersionError     error

	NumCalledGetLearningHistoryRecords int
	GetLearningHistoryRecordsError     error
	LearningHistoryRecordsToReturn     []LearningHistory

	NumCalledGetCourseDataRecords int
	GetCourseDataRecordsError     error
	CourseDataRecordsToReturn     []CourseData

	NumCalledGetOrgSuccessFactors int
	GetOrgSuccessFactorsError     error
	OrgSuccessFactorsToReturn     []OrgSuccessFactor

	NumCalledGetExpiringModules int
	GetExpiringModulesError     error
	ExpiringModulesToReturn     []ExpiringModule
}

func (*MockClient) ActiveOrgID

func (m *MockClient) ActiveOrgID() int

func (*MockClient) ActiveUserID

func (m *MockClient) ActiveUserID() int

func (*MockClient) CheckAuth

func (m *MockClient) CheckAuth(ctx context.Context) (User, error)

func (*MockClient) CreateAPIKey

func (m *MockClient) CreateAPIKey(ctx context.Context, input APIKey) (*APIKey, error)

func (*MockClient) CreateAsset

func (m *MockClient) CreateAsset(ctx context.Context, asset *Asset) error

func (*MockClient) CreateAssetVersion

func (m *MockClient) CreateAssetVersion(ctx context.Context, assetVersion *AssetVersion) error

func (*MockClient) CreateEvent

func (m *MockClient) CreateEvent(ctx context.Context, event *Event) error

func (*MockClient) CreateModuleVersion

func (m *MockClient) CreateModuleVersion(ctx context.Context, input ModuleVersion) (*ModuleVersion, error)

func (*MockClient) CreateMultiplayerServerVersion

func (m *MockClient) CreateMultiplayerServerVersion(ctx context.Context, input MultiplayerServerVersion) (*MultiplayerServerVersion, error)

func (*MockClient) CreateOrg

func (m *MockClient) CreateOrg(ctx context.Context, org Org) (*Org, error)

func (*MockClient) CreateSession

func (m *MockClient) CreateSession(ctx context.Context, session *Session) error

func (*MockClient) CreateUser

func (m *MockClient) CreateUser(ctx context.Context, user *User) error

func (*MockClient) CreateWebhook

func (m *MockClient) CreateWebhook(ctx context.Context, input Webhook) (*Webhook, error)

func (*MockClient) DeleteAPIKey

func (m *MockClient) DeleteAPIKey(ctx context.Context, id int) error

func (*MockClient) DeleteOrg

func (m *MockClient) DeleteOrg(ctx context.Context, id int) error

func (*MockClient) DeleteUser

func (m *MockClient) DeleteUser(ctx context.Context, id int) error

func (*MockClient) DeleteWebhook

func (m *MockClient) DeleteWebhook(ctx context.Context, id int) error

func (*MockClient) GetAPIKeys

func (m *MockClient) GetAPIKeys(ctx context.Context, params *APIKeyQueryParams) ([]APIKey, error)

func (*MockClient) GetAsset

func (m *MockClient) GetAsset(ctx context.Context, id int) (*Asset, error)

func (*MockClient) GetAssets

func (m *MockClient) GetAssets(ctx context.Context, params AssetParams) ([]Asset, error)

func (*MockClient) GetControlTypes

func (m *MockClient) GetControlTypes(ctx context.Context) ([]ControlType, error)

func (*MockClient) GetCourseDataRecords

func (m *MockClient) GetCourseDataRecords(ctx context.Context, orgID int) ([]CourseData, error)

func (*MockClient) GetExpiringModules

func (m *MockClient) GetExpiringModules(ctx context.Context) ([]ExpiringModule, error)

func (*MockClient) GetLearningHistoryRecords

func (m *MockClient) GetLearningHistoryRecords(ctx context.Context, params LearningHistoryParams) ([]LearningHistory, error)

func (*MockClient) GetModules

func (m *MockClient) GetModules(ctx context.Context, params ...ModuleParams) ([]Module, error)

func (*MockClient) GetMultiplayerServerConfigs

func (m *MockClient) GetMultiplayerServerConfigs(ctx context.Context, params *MultiplayerServerConfigParams) ([]MultiplayerServerConfigQueryParams, error)

func (*MockClient) GetMultiplayerServerVersion

func (m *MockClient) GetMultiplayerServerVersion(ctx context.Context, versionID int) (*MultiplayerServerVersion, error)

func (*MockClient) GetMultiplayerServerVersions

func (m *MockClient) GetMultiplayerServerVersions(ctx context.Context, params *MultiplayerServerVersionParams) ([]MultiplayerServerVersion, error)

func (*MockClient) GetMultiplayerServerVersionsWithConfig

func (m *MockClient) GetMultiplayerServerVersionsWithConfig(ctx context.Context, params *MultiplayerServerVersionParams) ([]MultiplayerServerVersion, error)

func (*MockClient) GetOrg

func (m *MockClient) GetOrg(ctx context.Context, id int) (*Org, error)

func (*MockClient) GetOrgSuccessFactors

func (m *MockClient) GetOrgSuccessFactors(ctx context.Context) ([]OrgSuccessFactor, error)

func (*MockClient) GetOrgs

func (m *MockClient) GetOrgs(ctx context.Context, params ...*OrgParams) ([]Org, error)

func (*MockClient) GetPlatforms

func (m *MockClient) GetPlatforms(ctx context.Context) ([]Platform, error)

func (*MockClient) GetRoles

func (m *MockClient) GetRoles(ctx context.Context) ([]Role, error)

func (*MockClient) GetSession

func (m *MockClient) GetSession(ctx context.Context, id int) (*Session, error)

func (*MockClient) GetUser

func (m *MockClient) GetUser(ctx context.Context, id int) (*User, error)

func (*MockClient) GetUserByUsername

func (m *MockClient) GetUserByUsername(ctx context.Context, username string) (*User, error)

func (*MockClient) GetWebhook

func (m *MockClient) GetWebhook(ctx context.Context, id int) (*Webhook, error)

func (*MockClient) GetWebhooks

func (m *MockClient) GetWebhooks(ctx context.Context, params *WebhookParams) ([]Webhook, error)

func (*MockClient) Path

func (m *MockClient) Path() string

func (*MockClient) PostAsset

func (m *MockClient) PostAsset(ctx context.Context, assetVersion *AssetVersion) error

func (*MockClient) Reset

func (m *MockClient) Reset()

func (*MockClient) RetrieveAssets

func (m *MockClient) RetrieveAssets(ctx context.Context, params AssetParams) ([]Asset, error)

func (*MockClient) UpdateAssetVersion

func (m *MockClient) UpdateAssetVersion(ctx context.Context, assetVersion *AssetVersion) error

func (*MockClient) UpdateMultiplayerServerVersion

func (m *MockClient) UpdateMultiplayerServerVersion(ctx context.Context, input MultiplayerServerVersion) (*MultiplayerServerVersion, error)

func (*MockClient) UpdateOrg

func (m *MockClient) UpdateOrg(ctx context.Context, org Org) (*Org, error)

func (*MockClient) UpdateSession

func (m *MockClient) UpdateSession(ctx context.Context, session Session) (*Session, error)

func (*MockClient) UpdateUser

func (m *MockClient) UpdateUser(ctx context.Context, user *User) error

func (*MockClient) UpdateWebhook

func (m *MockClient) UpdateWebhook(ctx context.Context, input Webhook) (*Webhook, error)

type Module

type Module struct {
	ID           int    `json:"id,omitempty"`
	Name         string `json:"name,omitempty"`
	Abbreviation string `json:"abbreviation,omitempty"`
	Description  string `json:"description,omitempty"`
	ImageLink    string `json:"imageLink,omitempty"`
	ShortDesc    string `json:"shortDesc,omitempty"`
	ExternalID   string `json:"externalId,omitempty"`

	GitConfigID int       `json:"gitConfigId,omitempty"`
	GitConfig   GitConfig `json:"gitConfig,omitempty"`

	CreatedAt time.Time `json:"createdAt,omitempty"`
	UpdatedAt time.Time `json:"updatedAt,omitempty"`
}

type ModuleParams

type ModuleParams struct {
	Name string `json:"name"`
}

type ModuleVersion

type ModuleVersion struct {
	ID              int    `json:"id,omitempty"`
	ModuleID        int    `json:"moduleId,omitempty"`
	Module          Module `json:"module,omitempty"`
	Status          string `json:"status,omitempty"`
	FileLink        string `json:"fileLink,omitempty"`
	SemanticVersion string `json:"version,omitempty"`
	Notes           string `json:"notes,omitempty"`
	Package         string `json:"package,omitempty"`
	ExternalID      string `json:"externalId,omitempty"`
	LocalFilePath   string `json:"-"`
	ControlIds      []int  `json:"controlIds,omitempty"`
	PlatformIds     []int  `json:"platformIds,omitempty"`
}

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"`

	CreatedAt *time.Time `json:"createdAt,omitempty"`
	UpdatedAt *time.Time `json:"updatedAt,omitempty"`
}

type MultiplayerServerConfigParams

type MultiplayerServerConfigParams struct {
	ModuleID       int                        `json:"moduleId,omitempty"`
	OrgID          int                        `json:"orgId,omitempty"`
	ServerVersion  string                     `json:"serverVersion,omitempty"`
	Capacity       int                        `json:"capacity,omitempty"`
	ServerVersions []MultiplayerServerVersion `json:"serverVersions,omitempty"`
}

type MultiplayerServerConfigQuery

type MultiplayerServerConfigQuery struct {
	MultiplayerServerConfigs []MultiplayerServerConfigQueryParams `graphql:"multiplayerServerConfigs(params: $params)"`
}

type MultiplayerServerConfigQueryParams

type MultiplayerServerConfigQueryParams struct {
	ID       int  `json:"id" graphql:"id"`
	ModuleID int  `json:"moduleId" graphql:"moduleId"`
	Capacity int  `json:"capacity" graphql:"capacity"`
	Disabled bool `json:"disabled" graphql:"disabled"`
	Module   struct {
		ID   int    `json:"id" graphql:"id"`
		Name string `json:"name" graphql:"name"`
	}
	ServerVersions []MultiplayerServerVersion `json:"serverVersions" graphql:"serverVersions"`
}

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 *time.Time `json:"createdAt,omitempty"`
	UpdatedAt *time.Time `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,omitempty" graphql:"imageRegistry"`
	SemanticVersion string `json:"semanticVersion,omitempty" graphql:"semanticVersion"`
	FileLink        string `json:"fileLink,omitempty" graphql:"fileLink"`
	FilePath        string `json:"filePath,omitempty" graphql:"filePath"`
	LocalFilePath   string `json:"-" graphql:"-"`

	ModuleID int     `json:"moduleId,omitempty" graphql:"moduleId"`
	Module   *Module `json:"module,omitempty" graphql:"module"`

	CreatedBy string `json:"createdBy,omitempty" graphql:"createdBy"`
	UpdatedBy string `json:"updatedBy,omitempty" graphql:"updatedBy"`

	CreatedAt *time.Time `json:"createdAt,omitempty" graphql:"createdAt"`
	UpdatedAt *time.Time `json:"updatedAt,omitempty" graphql:"updatedAt"`
}

type MultiplayerServerVersionParams

type MultiplayerServerVersionParams struct {
	ModuleID        int    `json:"moduleId" graphql:"moduleId"`
	SemanticVersion string `json:"semanticVersion" graphql:"semanticVersion"`
}

type MultiplayerServerVersionQuery

type MultiplayerServerVersionQuery struct {
	MultiplayerServerVersions []MultiplayerServerVersion `graphql:"multiplayerServerVersions(params: $params)"`
}

type Org

type Org struct {
	ID              int       `json:"id"`
	Name            string    `json:"name"`
	Type            string    `json:"type"`
	Status          string    `json:"enabled"`
	LogoLink        string    `json:"logoLink"`
	HubLogoLink     string    `json:"hubLogoLink"`
	PrimaryColor    string    `json:"primaryColor"`
	SecondaryColor  string    `json:"secondaryColor"`
	InheritedColors OrgColors `json:"inheritedColors"`
	OpenAccess      bool      `json:"openAccess"`
	CreatedAt       time.Time `json:"createdAt"`
	UpdatedAt       time.Time `json:"updatedAt"`
}

type OrgColors

type OrgColors struct {
	Primary   string `json:"primary"`
	Secondary string `json:"secondary"`
}

type OrgParams

type OrgParams struct {
	Name string `json:"name"`
}

type OrgSuccessFactor

type OrgSuccessFactor struct {
	ID    int    `json:"id" gorm:"primaryKey"`
	Path  string `json:"path" gorm:"column:path"`
	OrgID int    `json:"orgId" gorm:"column:org_id"`
}

type OrgSuccessFactorsResponse

type OrgSuccessFactorsResponse struct {
	OrgSuccessFactors []OrgSuccessFactor `json:"orgSuccessFactors"`
}

type Platform

type Platform struct {
	ID        int    `json:"id,omitempty"`
	Name      string `json:"name,omitempty"`
	ShortName string `json:"shortName,omitempty"`
}

type PostAssetVersionResponse

type PostAssetVersionResponse struct {
	Message      string       `json:"message"`
	Error        string       `json:"error"`
	Asset        Asset        `json:"asset"`
	AssetVersion AssetVersion `json:"version"`
}

type Role

type Role struct {
	ID          int    `json:"id,omitempty"`
	Name        string `json:"name,omitempty"`
	Permissions string `json:"permissions,omitempty"`

	CreatedAt time.Time `json:"createdAt,omitempty"`
	UpdatedAt time.Time `json:"updatedAt,omitempty"`
}

type Session

type Session struct {
	ID int `json:"id,omitempty"`

	UUID           *string `json:"uuid,omitempty"`
	IPAddress      string  `json:"ipAddress,omitempty"`
	DeviceID       string  `json:"deviceId,omitempty"`
	RawScore       float64 `json:"rawScore,omitempty"`
	MaxScore       float64 `json:"maxScore,omitempty"`
	ScaledScore    float64 `json:"scaledScore,omitempty"`
	Status         string  `json:"status,omitempty"`
	LessonStatus   string  `json:"lessonStatus,omitempty"`
	Scenario       string  `json:"scenario,omitempty"`
	Mode           string  `json:"mode,omitempty"`
	Focus          string  `json:"focus,omitempty"`
	Specialization string  `json:"specialization,omitempty"`
	Completed      bool    `json:"completed,omitempty"`
	CompletedAt    string  `json:"completedAt,omitempty"`
	Duration       string  `json:"duration,omitempty"`

	UserID        int     `json:"userId,omitempty"`
	User          User    `json:"user,omitempty"`
	OrgID         int     `json:"orgId,omitempty"`
	Org           Org     `json:"org,omitempty"`
	ModuleID      int     `json:"moduleId,omitempty"`
	Module        Module  `json:"module,omitempty"`
	ModuleVersion string  `json:"moduleVersion,omitempty"`
	Events        []Event `json:"events,omitempty"`

	CreatedAt time.Time `json:"createdAt,omitempty"`
	UpdatedAt time.Time `json:"updatedAt,omitempty"`

	JoinExtensions     *string      `json:"joinExtensions,omitempty"`
	CompleteExtensions *string      `json:"completeExtensions,omitempty"`
	EventResult        *EventResult `json:"eventResult,omitempty"`
}

type SessionResponse

type SessionResponse struct {
	Session Session `json:"session"`
}

type UpdateAssetVersionResponse

type UpdateAssetVersionResponse struct {
	AssetVersion AssetVersion `json:"updateAssetVersion"`
}

type UpdateEventResponse

type UpdateEventResponse struct {
	Event Event `json:"updateEvent"`
}

type UpdateOrgResponse

type UpdateOrgResponse struct {
	Org Org `json:"updateOrg"`
}

type UpdateSessionResponse

type UpdateSessionResponse struct {
	Session Session `json:"updateSession"`
}

type UpdateUserResponse

type UpdateUserResponse struct {
	User User `json:"updateUser"`
}

type UpdateWebhookResponse

type UpdateWebhookResponse struct {
	Webhook Webhook `json:"updateWebhook"`
}

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"`
}

type Webhook

type Webhook struct {
	ID            int      `json:"id,omitempty"`
	URL           string   `json:"url,omitempty"`
	EventTypes    []string `json:"eventTypes,omitempty"`
	Description   string   `json:"description,omitempty"`
	Token         string   `json:"token,omitempty"`
	GenerateToken *bool    `json:"generateToken,omitempty"`
	OrgID         int      `json:"orgId,omitempty"`
	Org           *Org     `json:"org,omitempty"`
}

type WebhookParams

type WebhookParams struct {
	OrgID int `json:"orgId"`
}

Jump to

Keyboard shortcuts

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