Documentation ¶
Index ¶
- Constants
- Variables
- func AvailableLanguages() map[string]AvailableLanguage
- type Action
- type ActionCreateData
- func (*ActionCreateData) Descriptor() ([]byte, []int)deprecated
- func (x *ActionCreateData) GetGameName() string
- func (x *ActionCreateData) GetGameURL() string
- func (x *ActionCreateData) GetLanguage() string
- func (x *ActionCreateData) GetLibraryVersion() string
- func (x *ActionCreateData) GetProjectType() ProjectType
- func (*ActionCreateData) ProtoMessage()
- func (x *ActionCreateData) ProtoReflect() protoreflect.Message
- func (x *ActionCreateData) Reset()
- func (x *ActionCreateData) String() string
- type ActionRunClientData
- func (*ActionRunClientData) Descriptor() ([]byte, []int)deprecated
- func (x *ActionRunClientData) GetArgs() []string
- func (x *ActionRunClientData) GetGameID() string
- func (x *ActionRunClientData) GetGameURL() string
- func (x *ActionRunClientData) GetLanguage() string
- func (x *ActionRunClientData) GetPlayerID() string
- func (x *ActionRunClientData) GetPlayerSecret() string
- func (x *ActionRunClientData) GetSpectate() bool
- func (*ActionRunClientData) ProtoMessage()
- func (x *ActionRunClientData) ProtoReflect() protoreflect.Message
- func (x *ActionRunClientData) Reset()
- func (x *ActionRunClientData) String() string
- type ActionRunServerData
- func (*ActionRunServerData) Descriptor() ([]byte, []int)deprecated
- func (x *ActionRunServerData) GetArgs() []string
- func (x *ActionRunServerData) GetLanguage() string
- func (x *ActionRunServerData) GetPort() int32
- func (*ActionRunServerData) ProtoMessage()
- func (x *ActionRunServerData) ProtoReflect() protoreflect.Message
- func (x *ActionRunServerData) Reset()
- func (x *ActionRunServerData) String() string
- type ActionUpdateData
- func (*ActionUpdateData) Descriptor() ([]byte, []int)deprecated
- func (x *ActionUpdateData) GetGameURL() string
- func (x *ActionUpdateData) GetLanguage() string
- func (x *ActionUpdateData) GetLibraryVersion() string
- func (x *ActionUpdateData) GetProjectType() ProjectType
- func (*ActionUpdateData) ProtoMessage()
- func (x *ActionUpdateData) ProtoReflect() protoreflect.Message
- func (x *ActionUpdateData) Reset()
- func (x *ActionUpdateData) String() string
- type AvailableLanguage
- type Module
- func (m *Module) ExecCreateClient(gameName, gameURL, language string, cgVersion versions.Version) (modVersion versions.Version, err error)
- func (m *Module) ExecCreateServer(gameName, language string) (modVersion versions.Version, err error)
- func (m *Module) ExecInfo(modVersion versions.Version) (ModuleInfo, error)
- func (m *Module) ExecRunClient(modVersion versions.Version, gameURL, language, gameID string, ...) error
- func (m *Module) ExecRunServer(modVersion versions.Version, language string, port *int32, args []string) error
- func (m *Module) ExecUpdateClient(language, gameURL string, cgVersion versions.Version) (modVersion versions.Version, err error)
- func (m *Module) ExecUpdateServer(language, gameURL string, cgVersion versions.Version) (modVersion versions.Version, err error)
- type ModuleInfo
- type ProjectType
- func (ProjectType) Descriptor() protoreflect.EnumDescriptor
- func (x ProjectType) Enum() *ProjectType
- func (ProjectType) EnumDescriptor() ([]byte, []int)deprecated
- func (x ProjectType) Number() protoreflect.EnumNumber
- func (x ProjectType) String() string
- func (ProjectType) Type() protoreflect.EnumType
- type ProviderGithub
- func (p *ProviderGithub) DownloadModuleBinary(target io.Writer, providerVars map[string]any, version versions.Version) error
- func (p *ProviderGithub) FindExactVersion(providerVars map[string]any, version versions.Version) (versions.Version, error)
- func (p *ProviderGithub) Name() string
- func (p *ProviderGithub) ValidateProviderVars(providerVars map[string]any) []string
- type ProviderLocal
- func (p *ProviderLocal) DownloadModuleBinary(target io.Writer, providerVars map[string]any, version versions.Version) error
- func (p *ProviderLocal) FindExactVersion(providerVars map[string]any, version versions.Version) (versions.Version, error)
- func (p *ProviderLocal) Name() string
- func (p *ProviderLocal) ValidateProviderVars(providerVars map[string]any) []string
Constants ¶
View Source
const FeedbackPkg = feedback.Package("modules")
Variables ¶
View Source
var ( ProjectType_name = map[int32]string{ 0: "CLIENT", 1: "SERVER", } ProjectType_value = map[string]int32{ "CLIENT": 0, "SERVER": 1, } )
Enum value maps for ProjectType.
View Source
var ( ErrUnsupportedProjectType = errors.New("unsupported project type") ErrUnsupportedCodeGameVersion = errors.New("unsupported codegame version") )
View Source
var ErrFileNotFound = errors.New("file not found")
View Source
var ErrVersionNotFound = errors.New("version not found")
View Source
var File_action_data_proto protoreflect.FileDescriptor
Functions ¶
func AvailableLanguages ¶
func AvailableLanguages() map[string]AvailableLanguage
Types ¶
type ActionCreateData ¶
type ActionCreateData struct { ProjectType ProjectType `protobuf:"varint,1,opt,name=projectType,proto3,enum=modules.ProjectType" json:"projectType,omitempty"` Language string `protobuf:"bytes,2,opt,name=language,proto3" json:"language,omitempty"` GameName string `protobuf:"bytes,3,opt,name=gameName,proto3" json:"gameName,omitempty"` // only needed for clients GameURL *string `protobuf:"bytes,4,opt,name=gameURL,proto3,oneof" json:"gameURL,omitempty"` // empty -> use latest LibraryVersion *string `protobuf:"bytes,5,opt,name=libraryVersion,proto3,oneof" json:"libraryVersion,omitempty"` // contains filtered or unexported fields }
func GetCreateData ¶
func GetCreateData() *ActionCreateData
func (*ActionCreateData) Descriptor
deprecated
func (*ActionCreateData) Descriptor() ([]byte, []int)
Deprecated: Use ActionCreateData.ProtoReflect.Descriptor instead.
func (*ActionCreateData) GetGameName ¶
func (x *ActionCreateData) GetGameName() string
func (*ActionCreateData) GetGameURL ¶
func (x *ActionCreateData) GetGameURL() string
func (*ActionCreateData) GetLanguage ¶
func (x *ActionCreateData) GetLanguage() string
func (*ActionCreateData) GetLibraryVersion ¶
func (x *ActionCreateData) GetLibraryVersion() string
func (*ActionCreateData) GetProjectType ¶
func (x *ActionCreateData) GetProjectType() ProjectType
func (*ActionCreateData) ProtoMessage ¶
func (*ActionCreateData) ProtoMessage()
func (*ActionCreateData) ProtoReflect ¶
func (x *ActionCreateData) ProtoReflect() protoreflect.Message
func (*ActionCreateData) Reset ¶
func (x *ActionCreateData) Reset()
func (*ActionCreateData) String ¶
func (x *ActionCreateData) String() string
type ActionRunClientData ¶
type ActionRunClientData struct { Language string `protobuf:"bytes,1,opt,name=language,proto3" json:"language,omitempty"` // command line args to pass to the program Args []string `protobuf:"bytes,2,rep,name=args,proto3" json:"args,omitempty"` GameURL string `protobuf:"bytes,3,opt,name=gameURL,proto3" json:"gameURL,omitempty"` GameID string `protobuf:"bytes,4,opt,name=gameID,proto3" json:"gameID,omitempty"` Spectate bool `protobuf:"varint,5,opt,name=spectate,proto3" json:"spectate,omitempty"` // needed if spectate is false PlayerID *string `protobuf:"bytes,6,opt,name=playerID,proto3,oneof" json:"playerID,omitempty"` // needed if spectate is false PlayerSecret *string `protobuf:"bytes,7,opt,name=playerSecret,proto3,oneof" json:"playerSecret,omitempty"` // contains filtered or unexported fields }
func GetRunClientData ¶
func GetRunClientData() *ActionRunClientData
func (*ActionRunClientData) Descriptor
deprecated
func (*ActionRunClientData) Descriptor() ([]byte, []int)
Deprecated: Use ActionRunClientData.ProtoReflect.Descriptor instead.
func (*ActionRunClientData) GetArgs ¶
func (x *ActionRunClientData) GetArgs() []string
func (*ActionRunClientData) GetGameID ¶
func (x *ActionRunClientData) GetGameID() string
func (*ActionRunClientData) GetGameURL ¶
func (x *ActionRunClientData) GetGameURL() string
func (*ActionRunClientData) GetLanguage ¶
func (x *ActionRunClientData) GetLanguage() string
func (*ActionRunClientData) GetPlayerID ¶
func (x *ActionRunClientData) GetPlayerID() string
func (*ActionRunClientData) GetPlayerSecret ¶
func (x *ActionRunClientData) GetPlayerSecret() string
func (*ActionRunClientData) GetSpectate ¶
func (x *ActionRunClientData) GetSpectate() bool
func (*ActionRunClientData) ProtoMessage ¶
func (*ActionRunClientData) ProtoMessage()
func (*ActionRunClientData) ProtoReflect ¶
func (x *ActionRunClientData) ProtoReflect() protoreflect.Message
func (*ActionRunClientData) Reset ¶
func (x *ActionRunClientData) Reset()
func (*ActionRunClientData) String ¶
func (x *ActionRunClientData) String() string
type ActionRunServerData ¶
type ActionRunServerData struct { Language string `protobuf:"bytes,1,opt,name=language,proto3" json:"language,omitempty"` // command line args to pass to the program Args []string `protobuf:"bytes,2,rep,name=args,proto3" json:"args,omitempty"` Port *int32 `protobuf:"varint,3,opt,name=port,proto3,oneof" json:"port,omitempty"` // contains filtered or unexported fields }
func GetRunServerData ¶
func GetRunServerData() *ActionRunServerData
func (*ActionRunServerData) Descriptor
deprecated
func (*ActionRunServerData) Descriptor() ([]byte, []int)
Deprecated: Use ActionRunServerData.ProtoReflect.Descriptor instead.
func (*ActionRunServerData) GetArgs ¶
func (x *ActionRunServerData) GetArgs() []string
func (*ActionRunServerData) GetLanguage ¶
func (x *ActionRunServerData) GetLanguage() string
func (*ActionRunServerData) GetPort ¶
func (x *ActionRunServerData) GetPort() int32
func (*ActionRunServerData) ProtoMessage ¶
func (*ActionRunServerData) ProtoMessage()
func (*ActionRunServerData) ProtoReflect ¶
func (x *ActionRunServerData) ProtoReflect() protoreflect.Message
func (*ActionRunServerData) Reset ¶
func (x *ActionRunServerData) Reset()
func (*ActionRunServerData) String ¶
func (x *ActionRunServerData) String() string
type ActionUpdateData ¶
type ActionUpdateData struct { ProjectType ProjectType `protobuf:"varint,1,opt,name=projectType,proto3,enum=modules.ProjectType" json:"projectType,omitempty"` Language string `protobuf:"bytes,2,opt,name=language,proto3" json:"language,omitempty"` // only needed for clients GameURL *string `protobuf:"bytes,3,opt,name=gameURL,proto3,oneof" json:"gameURL,omitempty"` // empty -> use latest LibraryVersion *string `protobuf:"bytes,4,opt,name=libraryVersion,proto3,oneof" json:"libraryVersion,omitempty"` // contains filtered or unexported fields }
func GetUpdateData ¶
func GetUpdateData() *ActionUpdateData
func (*ActionUpdateData) Descriptor
deprecated
func (*ActionUpdateData) Descriptor() ([]byte, []int)
Deprecated: Use ActionUpdateData.ProtoReflect.Descriptor instead.
func (*ActionUpdateData) GetGameURL ¶
func (x *ActionUpdateData) GetGameURL() string
func (*ActionUpdateData) GetLanguage ¶
func (x *ActionUpdateData) GetLanguage() string
func (*ActionUpdateData) GetLibraryVersion ¶
func (x *ActionUpdateData) GetLibraryVersion() string
func (*ActionUpdateData) GetProjectType ¶
func (x *ActionUpdateData) GetProjectType() ProjectType
func (*ActionUpdateData) ProtoMessage ¶
func (*ActionUpdateData) ProtoMessage()
func (*ActionUpdateData) ProtoReflect ¶
func (x *ActionUpdateData) ProtoReflect() protoreflect.Message
func (*ActionUpdateData) Reset ¶
func (x *ActionUpdateData) Reset()
func (*ActionUpdateData) String ¶
func (x *ActionUpdateData) String() string
type AvailableLanguage ¶
type Module ¶
func LoadModule ¶
func (*Module) ExecCreateClient ¶
func (*Module) ExecCreateServer ¶
func (*Module) ExecInfo ¶
func (m *Module) ExecInfo(modVersion versions.Version) (ModuleInfo, error)
func (*Module) ExecRunClient ¶
func (*Module) ExecRunServer ¶
func (*Module) ExecUpdateClient ¶
type ModuleInfo ¶
type ProjectType ¶
type ProjectType int32
const ( ProjectType_CLIENT ProjectType = 0 ProjectType_SERVER ProjectType = 1 )
func (ProjectType) Descriptor ¶
func (ProjectType) Descriptor() protoreflect.EnumDescriptor
func (ProjectType) Enum ¶
func (x ProjectType) Enum() *ProjectType
func (ProjectType) EnumDescriptor
deprecated
func (ProjectType) EnumDescriptor() ([]byte, []int)
Deprecated: Use ProjectType.Descriptor instead.
func (ProjectType) Number ¶
func (x ProjectType) Number() protoreflect.EnumNumber
func (ProjectType) String ¶
func (x ProjectType) String() string
func (ProjectType) Type ¶
func (ProjectType) Type() protoreflect.EnumType
type ProviderGithub ¶
type ProviderGithub struct{}
func (*ProviderGithub) DownloadModuleBinary ¶
func (*ProviderGithub) FindExactVersion ¶
func (*ProviderGithub) Name ¶
func (p *ProviderGithub) Name() string
func (*ProviderGithub) ValidateProviderVars ¶
func (p *ProviderGithub) ValidateProviderVars(providerVars map[string]any) []string
type ProviderLocal ¶
type ProviderLocal struct{}
func (*ProviderLocal) DownloadModuleBinary ¶
func (*ProviderLocal) FindExactVersion ¶
func (*ProviderLocal) Name ¶
func (p *ProviderLocal) Name() string
func (*ProviderLocal) ValidateProviderVars ¶
func (p *ProviderLocal) ValidateProviderVars(providerVars map[string]any) []string
Click to show internal directories.
Click to hide internal directories.