platform

package
v0.0.0-...-d330e10 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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 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(ctx context.Context) ([]Platform, error)
	GetControlTypes(ctx context.Context) ([]ControlType, error)

	GetModules(ctx context.Context, params ...ModuleParams) ([]Module, error)
	CreateModuleVersion(ctx context.Context, input ModuleVersion) (*ModuleVersion, error)

	GetOrgs(ctx context.Context, params ...*OrgParams) ([]Org, error)
	GetOrg(ctx context.Context, id int) (*Org, error)
	CreateOrg(ctx context.Context, org Org) (*Org, error)
	UpdateOrg(ctx context.Context, org Org) (*Org, error)
	DeleteOrg(ctx context.Context, id int) error

	GetSession(ctx context.Context, id int) (*Session, error)
	CreateSession(ctx context.Context, session *Session) error
	UpdateSession(ctx context.Context, session Session) (*Session, error)
	CreateEvent(ctx context.Context, event *Event) error

	GetMultiplayerServerConfigs(ctx context.Context, params *MultiplayerServerConfigParams) ([]MultiplayerServerConfigQueryParams, error)
	GetMultiplayerServerVersions(ctx context.Context, params *MultiplayerServerVersionParams) ([]MultiplayerServerVersion, error)
	GetMultiplayerServerVersionsWithConfig(ctx context.Context, params *MultiplayerServerVersionParams) ([]MultiplayerServerVersion, error)
	GetMultiplayerServerVersion(ctx context.Context, id int) (*MultiplayerServerVersion, error)
	CreateMultiplayerServerVersion(ctx context.Context, input MultiplayerServerVersion) (*MultiplayerServerVersion, error)
	UpdateMultiplayerServerVersion(ctx context.Context, input MultiplayerServerVersion) (*MultiplayerServerVersion, 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 CreateAPIKeyResponse

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

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     map[string]interface{} `json:"jsonData,omitempty"`

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

type EventResponse

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

type GetAPIKeysResponse

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

type GetControlTypesResponse

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

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

	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
}

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) 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) GetControlTypes

func (m *MockClient) GetControlTypes(ctx context.Context) ([]ControlType, 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) 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) Reset

func (m *MockClient) Reset()

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"`
	OpenAccess  bool      `json:"openAccess"`
	CreatedAt   time.Time `json:"createdAt"`
	UpdatedAt   time.Time `json:"updatedAt"`
}

type OrgParams

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

type Platform

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

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

type SessionResponse

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

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