find

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2020 License: MIT Imports: 9 Imported by: 2

README

find

Библиотека поиска установленных версий 1С Предприяние

Documentation

Index

Constants

View Source
const (
	PlatformType exeType = iota
	ThinkClientType
	RACType
)
View Source
const GOOS = runtime.GOOS
View Source
const SEEK_ERROR_NOT_FOUNDED = "any platform version is not founded"

Variables

This section is empty.

Functions

func Exists

func Exists(name string) (bool, error)

func IsNoExist

func IsNoExist(name string) (bool, error)

func Platform

func Platform(opts ...Option) (string, error)

func PlatformByVersion

func PlatformByVersion(version string, opts ...Option) (string, error)

func RAC

func RAC(opts ...Option) (string, error)

func RACByVersion

func RACByVersion(version string, opts ...Option) (string, error)

func ThinkClient

func ThinkClient(opts ...Option) (string, error)

func ThinkClientByVersion

func ThinkClientByVersion(version string, opts ...Option) (string, error)

Types

type BitnessType

type BitnessType int
const (
	V8_x64 BitnessType = iota
	V8_x32
	V8_x64x32
	V8_x32x64
)

type Filter

type Filter interface {
	Apply(l VersionList) VersionList
}

type FilterByfunc

type FilterByfunc func(version PlatformVersion) bool

type Finder

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

func NewPlatformFinder

func NewPlatformFinder() *Finder

func (*Finder) AddDir

func (f *Finder) AddDir(dir string, ver string, bit BitnessType)

func (*Finder) DefaultDirs

func (f *Finder) DefaultDirs()

func (*Finder) ForceScan

func (f *Finder) ForceScan() (err error)

func (*Finder) Platform

func (f *Finder) Platform(filter Filter) (string, error)

func (*Finder) RAC

func (f *Finder) RAC(filter Filter) (string, error)

func (*Finder) Scan

func (f *Finder) Scan() error

func (*Finder) ThinkClient

func (f *Finder) ThinkClient(filter Filter) (string, error)

type Option

type Option func(f *QueryOptions)

func WithBitness

func WithBitness(bitness BitnessType) Option

func WithFinder

func WithFinder(f *Finder) Option

func WithVersion

func WithVersion(version string) Option

type PlatformVersion

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

func (PlatformVersion) Bitness

func (v PlatformVersion) Bitness() BitnessType

func (PlatformVersion) IsEmpty

func (v PlatformVersion) IsEmpty() bool

func (PlatformVersion) Platform

func (v PlatformVersion) Platform() string

func (PlatformVersion) RAC

func (v PlatformVersion) RAC() string

func (PlatformVersion) ThinkClient

func (v PlatformVersion) ThinkClient() string

func (PlatformVersion) Version

func (v PlatformVersion) Version() string

type QueryOptions

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

func (*QueryOptions) Options

func (f *QueryOptions) Options(opts []Option)

type VersionList

type VersionList []PlatformVersion

func (VersionList) ApplyFilter

func (l VersionList) ApplyFilter(f Filter) (pv PlatformVersion)

func (VersionList) FilterBy

func (l VersionList) FilterBy(f FilterByfunc) VersionList

Jump to

Keyboard shortcuts

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