material

package
v0.0.16 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2022 License: MIT Imports: 9 Imported by: 0

README

Go Report Card GoDoc GolangCI

xmodules/material for Xamboo - GO

The material package contains a set of tables and structures to manage materials for recipes, tips, do-it-yourself, vuilder processes, unitary costs, and anything that can use materials.

Version Changes Control

v0.0.1 - 2020-05-08

  • Compatible with xmodule context standard

v0.0.0 - 2020-03-05

  • Support for multithread context implemented

v0.0.0 - 2020-01-23

  • BuildCaches is now on parallel thread

v0.0.0 - 2020-01-03

  • This document added
  • Need xmodules/context to work
  • Need xmodules/translation to work
  • Improvements in creation of modules and tables
  • Some bugs corrected in the dump of the data

v0.0.0 - 2019-12-18

  • First release of module

Manual:

I. Materials

Intro


  1. Overview

Example:

import "github.com/webability-go/xmodules/material"


  1. Reference

To use the package:

import "github.com/webability-go/xmodules/material"

Documentation

Overview

Package user contains the list of administrative user for the system. All users have accesses, into a profile and even extended access based upon table records. It needs base xmodule.

Index

Constants

View Source
const (
	MODULEID         = "material"
	VERSION          = "0.0.1"
	TRANSLATIONTHEME = "material"
)

Variables

This section is empty.

Functions

func CreateStructureMaterialByData

func CreateStructureMaterialByData(sitecontext applications.Datasource, data xdominion.XRecordDef, lang language.Tag) base.Structure

func CreateStructureMaterialByKey

func CreateStructureMaterialByKey(sitecontext applications.Datasource, key int, lang language.Tag) base.Structure

func GetMaterialCompositeName

func GetMaterialCompositeName(ctx *base.Datasource, quantity string, materialkey int, metrickey int, extra string, system int, lang language.Tag) string

func Setup

func Setup(ds applications.Datasource, prefix string) ([]string, error)

InitModule is called during the init phase to link the module with the system adds tables and caches to ctx::database

func StartContext

func StartContext(ds applications.Datasource, ctx *context.Context) error

func Synchronize

func Synchronize(ds applications.Datasource, prefix string) ([]string, error)

Types

type StructureMaterial

type StructureMaterial struct {
	Key  int
	Lang language.Tag
	Data *xdominion.XRecord
}

func GetMaterial

func GetMaterial(ctx *base.Datasource, clave int, lang language.Tag) *StructureMaterial

func (*StructureMaterial) Clone

func (sm *StructureMaterial) Clone() base.Structure

Clone the whole structure

func (*StructureMaterial) ComplementData

func (sm *StructureMaterial) ComplementData(sitecontext applications.Datasource)

ComplementData adds all the needed data from other objects /duplicable in the thread since the object will be destroyed at the end

func (*StructureMaterial) GetData

func (sm *StructureMaterial) GetData() *xdominion.XRecord

Returns the raw data

func (*StructureMaterial) IsAuthorized

func (sm *StructureMaterial) IsAuthorized(sitecontext applications.Datasource, site string, language string, device string) bool

IsAuthorized returns true if the structure can be used on this site/language/device

Jump to

Keyboard shortcuts

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