Documentation ¶
Overview ¶
Copyright Anton Feldmann
KPC is a Karel package managemant file. This structure is used to inform the tools about the structure of the project
Copyright Anton Feldmann ¶
KPC is a Karel package managemant file. This structure is used to inform the tools about the structure of the project
Copyright Anton Feldmann ¶
KPC is a Karel package managemant file. This structure is used to inform the tools about the structure of the project
Copyright Anton Feldmann ¶
KPC is a Karel package management structure. This structure is used to inform the tools about the structure of the project
Copyright Anton Feldmann ¶
KPC is a Karel package managemant file.
This module will handle the file.
Copyright Anton Feldmann ¶
KPC is a Karel package management structure. This structure is used to inform the tools about the structure of the project
Copyright Anton Feldmann ¶
KPC is a Karel package management structure. This structure is used to inform the tools about the structure of the project
Copyright Anton Feldmann ¶
KPC is a Karel package management structure. This structure is used to inform the tools about the structure of the project
Copyright Anton Feldmann ¶
KPC is a Karel package managemant file. This structure is used to inform the tools about the structure of the project
Copyright Anton Feldmann ¶
KPC is a Karel package management structure. This structure is used to inform the tools about the structure of the project
Copyright Anton Feldmann ¶
KPC is a Karel package management structure. This structure is used to inform the tools about the structure of the project
Copyright Anton Feldmann ¶
KPC is a Karel package management structure. This structure is used to inform the tools about the structure of the project
Copyright Anton Feldmann ¶
KPC is a Karel package management structure. This structure is used to inform the tools about the structure of the project
Copyright Anton Feldmann ¶
packages can depend on different pages. This structure will list all information
Copyright Anton Feldmann ¶
KPC is a Karel package management structure. This structure is used to inform the tools about the structure of the project
Index ¶
- Constants
- type Author
- type Conflict
- func (con *Conflict) AddElement(version string)
- func (con *Conflict) ChangeVersion(old, new_str string) bool
- func (con *Conflict) ContainsVersion(version string) bool
- func (con *Conflict) GetLength() int
- func (con *Conflict) GetName() *string
- func (con *Conflict) RejectVersion(version string)
- func (con *Conflict) SetName(name string)
- type KPC
- func (kpc_obj *KPC) AddAuthor(aut Author)
- func (kpc_obj *KPC) AddConflict(con Conflict)
- func (kpc_obj *KPC) AddConst(con string)
- func (kpc_obj *KPC) AddDict(dict string)
- func (kpc_obj *KPC) AddForm(form string)
- func (kpc_obj *KPC) AddInclude(inc string)
- func (kpc_obj *KPC) AddRepo(repo Repository)
- func (kpc_obj *KPC) AddRequirement(req Requirement)
- func (kpc_obj *KPC) AddType(type_ string)
- func (kpc_obj *KPC) AuthorsSize() int
- func (kpc_obj *KPC) ConflictSize() int
- func (kpc_obj *KPC) ConstsSize() int
- func (kpc_obj *KPC) ContainKeyword(key string) (bool, string)
- func (kpc_obj *KPC) DictsSize() int
- func (kpc_obj *KPC) FormsSize() int
- func (kpc_obj *KPC) GetAuthor(name string) *Author
- func (kpc_obj *KPC) GetConflict(name string) *Conflict
- func (kpc_obj *KPC) GetConflicts() []Conflict
- func (kpc_obj *KPC) GetConst(con string) *string
- func (kpc_obj *KPC) GetConstDir() *string
- func (kpc_obj *KPC) GetConsts() []string
- func (kpc_obj *KPC) GetDescription() *string
- func (kpc_obj *KPC) GetDict(dict string) *string
- func (kpc_obj *KPC) GetDictDir() *string
- func (kpc_obj *KPC) GetDicts() []string
- func (kpc_obj *KPC) GetForm(form string) *string
- func (kpc_obj *KPC) GetFormDir() *string
- func (kpc_obj *KPC) GetForms() []string
- func (kpc_obj *KPC) GetHomepage() *string
- func (kpc_obj *KPC) GetInclude(inc string) *string
- func (kpc_obj *KPC) GetIncludeDir() *string
- func (kpc_obj *KPC) GetIncludes() []string
- func (kpc_obj *KPC) GetIssue() *string
- func (kpc_obj *KPC) GetKPCVersion() string
- func (kpc_obj *KPC) GetKeywords() []string
- func (kpc_obj *KPC) GetMainSourceFile() *string
- func (kpc_obj *KPC) GetName() *string
- func (kpc_obj *KPC) GetPrefix() *string
- func (kpc_obj *KPC) GetRepo() *Repository
- func (kpc_obj *KPC) GetRequirement(name string) *Requirement
- func (kpc_obj *KPC) GetSourceDir() *string
- func (kpc_obj *KPC) GetType(type_ string) *string
- func (kpc_obj *KPC) GetTypeDir() *string
- func (kpc_obj *KPC) GetTypes() []string
- func (kpc_obj *KPC) GetVersion() *string
- func (kpc_obj *KPC) IncludesSize() int
- func (kpc_obj *KPC) RejectAuthor(name string)
- func (kpc_obj *KPC) RejectConflict(name string)
- func (kpc_obj *KPC) RejectConst(name string)
- func (kpc_obj *KPC) RejectDict(name string)
- func (kpc_obj *KPC) RejectForm(name string)
- func (kpc_obj *KPC) RejectInclude(name string)
- func (kpc_obj *KPC) RejectRequirement(name string)
- func (kpc_obj *KPC) RejectType(name string)
- func (kpc_obj *KPC) RequirementSize() int
- func (kpc_obj *KPC) SetConstDir(path string)
- func (kpc_obj *KPC) SetDescription(desc string)
- func (kpc_obj *KPC) SetDictDir(path string)
- func (kpc_obj *KPC) SetFormDir(path string)
- func (kpc_obj *KPC) SetHomepage(url string)
- func (kpc_obj *KPC) SetIncludeDir(path string)
- func (kpc_obj *KPC) SetIssue(issue string)
- func (kpc_obj *KPC) SetKeyword(key string)
- func (kpc_obj *KPC) SetMainSourceFile(name string)
- func (kpc_obj *KPC) SetName(name string)
- func (kpc_obj *KPC) SetPrefix(path string)
- func (kpc_obj *KPC) SetSourceDir(path string)
- func (kpc_obj *KPC) SetTypeDir(path string)
- func (kpc_obj *KPC) SetVersion(version string)
- func (kpc_obj *KPC) To() *string
- func (kpc_obj *KPC) TypesSize() int
- type Repository
- type Requirement
Constants ¶
const KpcVersion = "0.2.0"
the system of this packing systems
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Author ¶
a package has to be written by atleased one author an author is defined by name and the email
func InitAuthor ¶
an author needs atleased a name
the email is set to an empty string.
@param {string} name the author name
@return {*Author} the author structure
func (*Author) GetEmail ¶
get email of author get the author's email
this function is pagt of the Author structure
@return {*string} the Email address
func (*Author) GetName ¶
get name of author get the author's name
this function is pagt of the Author structure
@return {*string} the Author's name
type Conflict ¶
different projects can contain different conflicts on the given requirements
a conflict is targeted with a project name and one or different version of this project
func InitConflict ¶
building a conflict information
a conflict has to start with a name and one version. if there is non name then there is not conflict and if there is not a start version, then there is no conflict
@param {string} name the name of the conflicting project @param {string} version the version of the conflict
@return {*Conflict} the conflict information
func (*Conflict) AddElement ¶
add an version number
another version can be added to the version set.
@param {string} version the version to add to the list of conflicts
func (*Conflict) ChangeVersion ¶
change a version, because the error is not happen anymore or the version string is wrong
@param {string} old the old number @param {string} new the replaycement
@return {bool} the version is changed
func (*Conflict) ContainsVersion ¶
contains the version is the requested version into the set of versions
@param {string} the version to check
@return {bool} true if the version is in the list else false
func (*Conflict) GetLength ¶
the number of versions for that project that builds into conflicts
@return {int} the number of known versions for a conflict
func (*Conflict) GetName ¶
get the name of the package that triggers the error
@return {*string} the name of the project
func (*Conflict) RejectVersion ¶
reject a version from the list of conflicts. If a version is deleted then the list is resized. if the list has only one element, then the element cannot deleted. you need atlease one version to have a conflict
@param {string} version the version to delete
type KPC ¶
type KPC struct { /******************** KPC ********************/ KPC_Version string `toml:"kpc_version"` // version of the kpc /******************** Package information data ********************/ Name string `toml:"name"` // project name Description string `toml:"description,omitempty"` // project discription Version string `toml:"version"` // project version Homepage string `toml:"url,omitempty"` // project homepage Requirements []Requirement `toml:"requirements,omitempty"` // dependnency list Conflicts []Conflict `toml:"conflicts"` // known conflicts Authors []Author `toml:"authors"` // authorname Repository Repository `toml:"source"` // sorce code repository url Issue string `toml:"issues,omitempty"` // project issue homepage Keywords []string `toml:"keywords,omitempty"` // project issue homepage /********************* Package path settings***********************/ /*Package path settings*/ Prefix string `toml:"prefix"` // root path where the packge is installed SrcDir string `toml:"srcdir,omitempty"` // installation path to project sourcefiles (*.kl) TypeDir string `toml:"typedir,omitempty"` // installation path of project typefiles (*.t.kl) IncludeDir string `toml:"includedir,omitempty"` // installation path to project headerfiles (*.h.kl) ConstDir string `toml:"constdir,omitempty"` // installation path of the constant diclaraion files (*.c.kl) FormDir string `toml:"formdir,omitempty"` // the files might be in an directory (*.ftx) DictDir string `toml:"dictdir,omitempty"` // dictionaries are available for the (*.utx) /*************** specific file includes ***************************/ Main string `toml:"main,omitempty"` // the source file to compile Dicts []string `toml:"dict,omitempty"` // dictionary file Forms []string `toml:"form,omitempty"` // form file Types []string `toml:"types,omitempty"` // the library for Includes []string `toml:"includes,omitempty"` // specific header files for comilation Consts []string `toml:"consts,omitempty"` // the const files of this project }
func (*KPC) AddConflict ¶
you found a new conflict so add the conflict to the list
func (*KPC) AddConst ¶
add a new file with constant parameters
@param {string} path to constant parameter file
func (*KPC) AddInclude ¶
func (*KPC) AddRepo ¶
func (kpc_obj *KPC) AddRepo(repo Repository)
func (*KPC) AuthorsSize ¶
how many authors are working on this package
func (*KPC) ConstsSize ¶
func (*KPC) ContainKeyword ¶
does the kexword exist
func (*KPC) GetConflict ¶
get a specific conflict
func (*KPC) GetConst ¶
get on constant file path utilizing specific name
@param {string} constant file name @return {string*} path to file
func (*KPC) GetConstDir ¶
func (*KPC) GetConsts ¶
get the list of constant parameter files
@return {string array} list of strings
func (*KPC) GetDictDir ¶
func (*KPC) GetFormDir ¶
func (*KPC) GetInclude ¶
func (*KPC) GetIncludeDir ¶
func (*KPC) GetIncludes ¶
func (*KPC) GetMainSourceFile ¶
karel has amain program file. this method will have return the handle
@return {string} name of the file with
func (*KPC) GetRequirement ¶
func (kpc_obj *KPC) GetRequirement(name string) *Requirement
get all rewuirements
func (*KPC) GetSourceDir ¶
func (*KPC) GetTypeDir ¶
func (*KPC) IncludesSize ¶
func (*KPC) RejectAuthor ¶
delete a author from the package
func (*KPC) RejectConflict ¶
you did well and fixed an issue. then delete the conflict
func (*KPC) RejectConst ¶
func (*KPC) RejectDict ¶
func (*KPC) RejectForm ¶
func (*KPC) RejectInclude ¶
func (*KPC) RejectRequirement ¶
delete a requirement
func (*KPC) RejectType ¶
func (*KPC) RequirementSize ¶
how many requirements are stored
func (*KPC) SetConstDir ¶
func (*KPC) SetDictDir ¶
func (*KPC) SetFormDir ¶
func (*KPC) SetIncludeDir ¶
func (*KPC) SetSourceDir ¶
func (*KPC) SetTypeDir ¶
func (*KPC) SetVersion ¶
set the current package version
type Repository ¶
Repository is a structure to represend the developmentfiles the basic repository protocol is git the tag is the hash in the git tree.
type Requirement ¶
packages can contain requirements. this methods readout the information of additional KPC packages. if the packages are not available, then the program is not buildable
func InitRequirement ¶
func InitRequirement(name string) *Requirement
build a Requirement structure to speedup the workflow. the name of the requirement is mandatory, The default Version is '0.1.0'
@param {string} the name of the requirements
@return {*Requirement} The Structure ony containing the base information
func (*Requirement) GetName ¶
func (req *Requirement) GetName() *string
get name of requirement get the requirement name
this function is pagt of the Requirement structure
@return {*string} the requirement name
func (*Requirement) GetVersion ¶
func (req *Requirement) GetVersion() *string
get version of requirement get the requirement version
this function is pagt of the Requirement structure
@return {*string} the requirement version
func (*Requirement) SetName ¶
func (req *Requirement) SetName(name string)
set a new name. each project has a name. Maybe if the name was written wrong or changed druing time of process. This method change the name
this function is pagt of the Requirement structure
@param {string} name. the new name for the requirement
func (*Requirement) SetVersion ¶
func (req *Requirement) SetVersion(version string)
set a new version number each project starts with version '0.1.0'
this function is pagt of the Requirement structure
@param {string} version. the version can set by each user