osbridge

package module
v0.0.0-...-0e1c68c Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2019 License: AGPL-3.0 Imports: 5 Imported by: 0

README

OS Bridge for Go

We have implemented this to allow us to differentiate between different operating systems: Mac, Win and Linux.

Currently there is actually no difference between operating systems in the code, but that will be changing as we evolve our integration with each operating system.

##LICENSE

Documentation

Index

Constants

View Source
const (
	DefaultProjectName       Name = "OsBridge for Go"
	DefaultUserDataPath      Path = ".osbridge"
	DefaultAdminPath         Path = "admin"
	DefaultCachePath         Path = "cache"
	DefaultProjectDir        Dir  = "project"
	DefaultSupportRequestUrl Url  = "https://github.com/gearboxworks/go-status/issues"
)

Go-OsBridge - Operating System Bridge package for use in Go apps Copyright (C) 2019 NewClarity Consulting LLC

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.

Variables

View Source
var NilOsBridge = (*OsBridge)(nil)

Functions

This section is empty.

Types

type Args

type Args OsBridge

type Dir

type Dir = string

type DirMap

type DirMap = map[Name]Dir

type Name

type Name = string

type OsBridge

type OsBridge struct {
	ProjectName       Name
	ProjectDir        Dir
	UserDataPath      Path
	CachePath         Path
	AdminPath         Path
	SupportRequestUrl Url
	NamedPathMap      map[Name]Path
	NamedDirMap       map[Name]Dir
}

func NewOsBridge

func NewOsBridge(args ...*Args) *OsBridge

func (*OsBridge) GetAdminRootDir

func (me *OsBridge) GetAdminRootDir() Dir

func (*OsBridge) GetCacheDir

func (me *OsBridge) GetCacheDir() Dir

func (*OsBridge) GetNamedDir

func (me *OsBridge) GetNamedDir(dn Name) Url

func (*OsBridge) GetNamedDirMap

func (me *OsBridge) GetNamedDirMap() DirMap

func (*OsBridge) GetNamedPath

func (me *OsBridge) GetNamedPath(pn Name) Url

func (*OsBridge) GetNamedPathMap

func (me *OsBridge) GetNamedPathMap() PathMap

func (*OsBridge) GetProjectDir

func (me *OsBridge) GetProjectDir() string

func (*OsBridge) GetProjectName

func (me *OsBridge) GetProjectName() Name

func (*OsBridge) GetSupportRequestUrl

func (me *OsBridge) GetSupportRequestUrl() Url

func (*OsBridge) GetUserConfigDir

func (me *OsBridge) GetUserConfigDir() Dir

func (*OsBridge) GetUserHomeDir

func (me *OsBridge) GetUserHomeDir() Dir

type OsBridger

type OsBridger interface {
	GetUserHomeDir() Dir
	GetProjectName() Name
	GetProjectDir() Dir
	GetUserConfigDir() Dir
	GetAdminRootDir() Dir
	GetCacheDir() Dir
	GetSupportRequestUrl() Url
	GetNamedPath(pn Name) Url
	GetNamedDir(dn Name) Url
	GetNamedPathMap() PathMap
	GetNamedDirMap() DirMap
}

func Get

func Get(args ...*Args) OsBridger

type Path

type Path = string

type PathMap

type PathMap = map[Name]Path

type Url

type Url = string

Jump to

Keyboard shortcuts

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