semantic

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2024 License: GPL-3.0 Imports: 7 Imported by: 1

Documentation

Overview

ORM mapper for Freelancer ini reader. Easy mapping values to change.

Index

Constants

View Source
const PATH_SEPARATOR = `/`

Variables

This section is empty.

Functions

This section is empty.

Types

type Bool added in v0.8.0

type Bool struct {
	*Value
	// contains filtered or unexported fields
}

func NewBool added in v0.8.0

func NewBool(section *inireader.Section, key string, bool_type BoolType, opts ...ValueOption) *Bool

func (*Bool) Delete added in v0.8.0

func (s *Bool) Delete()

func (*Bool) Get added in v0.8.0

func (s *Bool) Get() bool

func (*Bool) GetValue added in v0.21.0

func (s *Bool) GetValue() (bool, bool)

func (*Bool) Set added in v0.8.0

func (s *Bool) Set(value bool)

type BoolType added in v0.21.0

type BoolType int64
const (
	IntBool BoolType = iota
	StrBool
)

type ConfigModel

type ConfigModel struct {
	// contains filtered or unexported fields
}

func (*ConfigModel) Init

func (s *ConfigModel) Init(sections []*inireader.Section, comments []string, filepath utils_types.FilePath)

func (*ConfigModel) Render

func (s *ConfigModel) Render() *inireader.INIFile

func (*ConfigModel) SetOutputPath

func (s *ConfigModel) SetOutputPath(filepath utils_types.FilePath)

type Float added in v0.8.0

type Float struct {
	*Value
	// contains filtered or unexported fields
}

func NewFloat added in v0.8.0

func NewFloat(section *inireader.Section, key string, precision Precision, opts ...ValueOption) *Float

func (*Float) Delete added in v0.8.0

func (s *Float) Delete()

func (*Float) Get added in v0.8.0

func (s *Float) Get() float64

func (*Float) GetValue added in v0.21.0

func (s *Float) GetValue() (float64, bool)

func (*Float) Set added in v0.8.0

func (s *Float) Set(value float64)

type Int

type Int struct {
	*Value
}

func NewInt

func NewInt(section *inireader.Section, key string, opts ...ValueOption) *Int

func (*Int) Delete

func (s *Int) Delete()

func (*Int) Get

func (s *Int) Get() int

func (*Int) GetValue added in v0.21.0

func (s *Int) GetValue() (int, bool)

func (*Int) Set

func (s *Int) Set(value int)

type Model

type Model struct {
	// contains filtered or unexported fields
}

func (*Model) Map

func (s *Model) Map(section *inireader.Section)

func (*Model) Render

func (s *Model) Render() *inireader.Section

type Path

type Path struct {
	*Value
	// contains filtered or unexported fields
}

Linux friendly filepath, that can be returned to Windows way from linux

func NewPath

func NewPath(section *inireader.Section, key string, opts ...PathOption) *Path

func (*Path) Delete

func (s *Path) Delete()

func (*Path) FileName

func (s *Path) FileName() utils_types.FilePath

func (*Path) Get

func (s *Path) Get() utils_types.FilePath

func (*Path) Set

func (s *Path) Set(value utils_types.FilePath)

type PathOption added in v0.14.0

type PathOption func(s *Path)

func OptsP added in v0.14.0

func OptsP(opts ...ValueOption) PathOption

func WithLowercaseP added in v0.14.0

func WithLowercaseP() PathOption

func WithoutSpacesP added in v0.14.0

func WithoutSpacesP() PathOption

type Precision added in v0.8.0

type Precision int

type String

type String struct {
	*Value
	// contains filtered or unexported fields
}

func NewString

func NewString(section *inireader.Section, key string, opts ...StringOption) *String

func (*String) Delete

func (s *String) Delete()

func (*String) Get

func (s *String) Get() string

func (*String) GetValue added in v0.21.0

func (s *String) GetValue() (string, bool)

func (*String) Set

func (s *String) Set(value string)

type StringOption added in v0.14.0

type StringOption func(s *String)

func OptsS added in v0.14.0

func OptsS(opts ...ValueOption) StringOption

func WithLowercaseS added in v0.14.0

func WithLowercaseS() StringOption

func WithoutSpacesS added in v0.14.0

func WithoutSpacesS() StringOption

type Value

type Value struct {
	// contains filtered or unexported fields
}

func NewValue added in v0.8.0

func NewValue(
	section *inireader.Section,
	key string,
) *Value

type ValueOption added in v0.8.0

type ValueOption func(i *Value)

func Index added in v0.8.0

func Index(index int) ValueOption

func Optional added in v0.8.0

func Optional() ValueOption

func Order added in v0.8.0

func Order(order int) ValueOption

type ValueType

type ValueType int64
const (
	TypeComment ValueType = iota
	TypeVisible
)

Jump to

Keyboard shortcuts

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