pushed final docs for initial merge
This commit is contained in:
116
config/docs.md
Normal file
116
config/docs.md
Normal file
@@ -0,0 +1,116 @@
|
||||
<!-- Code generated by gomarkdoc. DO NOT EDIT -->
|
||||
|
||||
# config
|
||||
|
||||
```go
|
||||
import "github.com/Akilan1999/p2p-rendering-computation/config"
|
||||
```
|
||||
|
||||
## Index
|
||||
|
||||
- [func GetCurrentPath\(\) \(string, error\)](<#GetCurrentPath>)
|
||||
- [func GetEnvName\(\) string](<#GetEnvName>)
|
||||
- [func GetPathP2PRC\(Envname string\) \(string, error\)](<#GetPathP2PRC>)
|
||||
- [func SetEnvName\(EnvName string\) error](<#SetEnvName>)
|
||||
- [type Config](<#Config>)
|
||||
- [func ConfigInit\(defaultsParameter map\[string\]interface\{\}, CustomConfig interface\{\}, envNameOptional ...string\) \(\*Config, error\)](<#ConfigInit>)
|
||||
- [func \(c \*Config\) GetPublicKey\(\) \(string, error\)](<#Config.GetPublicKey>)
|
||||
- [func \(c \*Config\) WriteConfig\(\) error](<#Config.WriteConfig>)
|
||||
|
||||
|
||||
<a name="GetCurrentPath"></a>
|
||||
## func [GetCurrentPath](<https://github.com/Akilan1999/p2p-rendering-computation/blob/master/config/config.go#L47>)
|
||||
|
||||
```go
|
||||
func GetCurrentPath() (string, error)
|
||||
```
|
||||
|
||||
GetCurrentPath Getting P2PRC Directory from environment variable
|
||||
|
||||
<a name="GetEnvName"></a>
|
||||
## func [GetEnvName](<https://github.com/Akilan1999/p2p-rendering-computation/blob/master/config/config.go#L80>)
|
||||
|
||||
```go
|
||||
func GetEnvName() string
|
||||
```
|
||||
|
||||
|
||||
|
||||
<a name="GetPathP2PRC"></a>
|
||||
## func [GetPathP2PRC](<https://github.com/Akilan1999/p2p-rendering-computation/blob/master/config/config.go#L53>)
|
||||
|
||||
```go
|
||||
func GetPathP2PRC(Envname string) (string, error)
|
||||
```
|
||||
|
||||
GetPathP2PRC Getting P2PRC Directory from environment variable
|
||||
|
||||
<a name="SetEnvName"></a>
|
||||
## func [SetEnvName](<https://github.com/Akilan1999/p2p-rendering-computation/blob/master/config/config.go#L74>)
|
||||
|
||||
```go
|
||||
func SetEnvName(EnvName string) error
|
||||
```
|
||||
|
||||
SetEnvName Sets the environment name This is to ensure that the Path of your project is detected from your environment variable This is useful when extending the use case of P2PRC
|
||||
|
||||
<a name="Config"></a>
|
||||
## type [Config](<https://github.com/Akilan1999/p2p-rendering-computation/blob/master/config/config.go#L19-L44>)
|
||||
|
||||
|
||||
|
||||
```go
|
||||
type Config struct {
|
||||
MachineName string
|
||||
IPTable string
|
||||
DockerContainers string
|
||||
DefaultDockerFile string
|
||||
DockerRunLogs string
|
||||
SpeedTestFile string
|
||||
IPV6Address string
|
||||
PluginPath string
|
||||
TrackContainersPath string
|
||||
ServerPort string
|
||||
ProxyPort string
|
||||
GroupTrackContainersPath string
|
||||
FRPServerPort string
|
||||
BehindNAT string
|
||||
IPTableKey string
|
||||
PublicKeyFile string
|
||||
PrivateKeyFile string
|
||||
PemFile string
|
||||
KeyFile string
|
||||
BareMetal bool
|
||||
UnsafeMode bool
|
||||
CustomConfig interface{}
|
||||
}
|
||||
```
|
||||
|
||||
<a name="ConfigInit"></a>
|
||||
### func [ConfigInit](<https://github.com/Akilan1999/p2p-rendering-computation/blob/master/config/config.go#L85>)
|
||||
|
||||
```go
|
||||
func ConfigInit(defaultsParameter map[string]interface{}, CustomConfig interface{}, envNameOptional ...string) (*Config, error)
|
||||
```
|
||||
|
||||
ConfigInit Pass environment name as an optional parameter
|
||||
|
||||
<a name="Config.GetPublicKey"></a>
|
||||
### func \(\*Config\) [GetPublicKey](<https://github.com/Akilan1999/p2p-rendering-computation/blob/master/config/config.go#L179>)
|
||||
|
||||
```go
|
||||
func (c *Config) GetPublicKey() (string, error)
|
||||
```
|
||||
|
||||
GetPublicKey Gets public key of the current machine based on the path provided on the config file
|
||||
|
||||
<a name="Config.WriteConfig"></a>
|
||||
### func \(\*Config\) [WriteConfig](<https://github.com/Akilan1999/p2p-rendering-computation/blob/master/config/config.go#L161>)
|
||||
|
||||
```go
|
||||
func (c *Config) WriteConfig() error
|
||||
```
|
||||
|
||||
|
||||
|
||||
Generated by [gomarkdoc](<https://github.com/princjef/gomarkdoc>)
|
||||
176
config/generate/docs.md
Normal file
176
config/generate/docs.md
Normal file
@@ -0,0 +1,176 @@
|
||||
<!-- Code generated by gomarkdoc. DO NOT EDIT -->
|
||||
|
||||
# generate
|
||||
|
||||
```go
|
||||
import "github.com/Akilan1999/p2p-rendering-computation/config/generate"
|
||||
```
|
||||
|
||||
## Index
|
||||
|
||||
- [func Copy\(src, dst string\) error](<#Copy>)
|
||||
- [func CreateIPTableFolderStructure\(\) \(err error\)](<#CreateIPTableFolderStructure>)
|
||||
- [func FileExists\(path string\) \(bool, error\)](<#FileExists>)
|
||||
- [func GenerateCertificate\(\) error](<#GenerateCertificate>)
|
||||
- [func GenerateClientTrackContainers\(\) \(err error\)](<#GenerateClientTrackContainers>)
|
||||
- [func GenerateDockerFiles\(\) \(err error\)](<#GenerateDockerFiles>)
|
||||
- [func GenerateFiles\(rootNodes ...p2p.IpAddress\) \(err error\)](<#GenerateFiles>)
|
||||
- [func GenerateIPTableFile\(rootNodes \[\]p2p.IpAddress\) \(err error\)](<#GenerateIPTableFile>)
|
||||
- [func GeneratePluginDirectory\(\) \(err error\)](<#GeneratePluginDirectory>)
|
||||
- [func GetPathP2PRC\(\) \(string, error\)](<#GetPathP2PRC>)
|
||||
- [func MakeSSHKeyPair\(pubKeyPath, privateKeyPath string\) error](<#MakeSSHKeyPair>)
|
||||
- [func SetDefaults\(envName string, forceDefault bool, CustomConfig interface\{\}, NoBoilerPlate bool, ConfigUpdate ...\*config.Config\) \(\*config.Config, error\)](<#SetDefaults>)
|
||||
- [func SetEnvName\(EnvName string\) error](<#SetEnvName>)
|
||||
- [func String\(length int\) string](<#String>)
|
||||
- [func StringWithCharset\(length int, charset string\) string](<#StringWithCharset>)
|
||||
- [type AuthorizedKey](<#AuthorizedKey>)
|
||||
|
||||
|
||||
<a name="Copy"></a>
|
||||
## func [Copy](<https://github.com/Akilan1999/p2p-rendering-computation/blob/master/config/generate/helperFunctions.go#L21>)
|
||||
|
||||
```go
|
||||
func Copy(src, dst string) error
|
||||
```
|
||||
|
||||
Copy the src file to dst. Any existing file will be overwritten and will not copy file attributes. Source: https://stackoverflow.com/questions/21060945/simple-way-to-copy-a-file
|
||||
|
||||
<a name="CreateIPTableFolderStructure"></a>
|
||||
## func [CreateIPTableFolderStructure](<https://github.com/Akilan1999/p2p-rendering-computation/blob/master/config/generate/generateFiles.go#L65>)
|
||||
|
||||
```go
|
||||
func CreateIPTableFolderStructure() (err error)
|
||||
```
|
||||
|
||||
CreateIPTableFolderStructure Create folder structure for IPTable
|
||||
|
||||
<a name="FileExists"></a>
|
||||
## func [FileExists](<https://github.com/Akilan1999/p2p-rendering-computation/blob/master/config/generate/generateFiles.go#L218>)
|
||||
|
||||
```go
|
||||
func FileExists(path string) (bool, error)
|
||||
```
|
||||
|
||||
FileExists exists returns whether the given file or directory exists source: https://stackoverflow.com/questions/10510691/how-to-check-whether-a-file-or-directory-exists
|
||||
|
||||
<a name="GenerateCertificate"></a>
|
||||
## func [GenerateCertificate](<https://github.com/Akilan1999/p2p-rendering-computation/blob/master/config/generate/generateCertificate.go#L51>)
|
||||
|
||||
```go
|
||||
func GenerateCertificate() error
|
||||
```
|
||||
|
||||
|
||||
|
||||
<a name="GenerateClientTrackContainers"></a>
|
||||
## func [GenerateClientTrackContainers](<https://github.com/Akilan1999/p2p-rendering-computation/blob/master/config/generate/generateFiles.go#L154>)
|
||||
|
||||
```go
|
||||
func GenerateClientTrackContainers() (err error)
|
||||
```
|
||||
|
||||
|
||||
|
||||
<a name="GenerateDockerFiles"></a>
|
||||
## func [GenerateDockerFiles](<https://github.com/Akilan1999/p2p-rendering-computation/blob/master/config/generate/generateFiles.go#L91>)
|
||||
|
||||
```go
|
||||
func GenerateDockerFiles() (err error)
|
||||
```
|
||||
|
||||
GenerateDockerFiles Generate default docker files
|
||||
|
||||
<a name="GenerateFiles"></a>
|
||||
## func [GenerateFiles](<https://github.com/Akilan1999/p2p-rendering-computation/blob/master/config/generate/generateFiles.go#L17>)
|
||||
|
||||
```go
|
||||
func GenerateFiles(rootNodes ...p2p.IpAddress) (err error)
|
||||
```
|
||||
|
||||
GenerateFiles Generates all the files needed to setup P2PRC
|
||||
|
||||
<a name="GenerateIPTableFile"></a>
|
||||
## func [GenerateIPTableFile](<https://github.com/Akilan1999/p2p-rendering-computation/blob/master/config/generate/generateFiles.go#L35>)
|
||||
|
||||
```go
|
||||
func GenerateIPTableFile(rootNodes []p2p.IpAddress) (err error)
|
||||
```
|
||||
|
||||
GenerateIPTableFile Generates the IPTable file with the appropirate root node
|
||||
|
||||
<a name="GeneratePluginDirectory"></a>
|
||||
## func [GeneratePluginDirectory](<https://github.com/Akilan1999/p2p-rendering-computation/blob/master/config/generate/generateFiles.go#L136>)
|
||||
|
||||
```go
|
||||
func GeneratePluginDirectory() (err error)
|
||||
```
|
||||
|
||||
GeneratePluginDirectory Generates plugin directory structure
|
||||
|
||||
<a name="GetPathP2PRC"></a>
|
||||
## func [GetPathP2PRC](<https://github.com/Akilan1999/p2p-rendering-computation/blob/master/config/generate/generate.go#L17>)
|
||||
|
||||
```go
|
||||
func GetPathP2PRC() (string, error)
|
||||
```
|
||||
|
||||
GetPathP2PRC Getting P2PRC Directory from environment variable
|
||||
|
||||
<a name="MakeSSHKeyPair"></a>
|
||||
## func [MakeSSHKeyPair](<https://github.com/Akilan1999/p2p-rendering-computation/blob/master/config/generate/generateFiles.go#L186>)
|
||||
|
||||
```go
|
||||
func MakeSSHKeyPair(pubKeyPath, privateKeyPath string) error
|
||||
```
|
||||
|
||||
MakeSSHKeyPair make a pair of public and private keys for SSH access. Public key is encoded in the format for inclusion in an OpenSSH authorized\_keys file. Private Key generated is PEM encoded source: https://gist.github.com/goliatone/e9c13e5f046e34cef6e150d06f20a34c
|
||||
|
||||
<a name="SetDefaults"></a>
|
||||
## func [SetDefaults](<https://github.com/Akilan1999/p2p-rendering-computation/blob/master/config/generate/generate.go#L36>)
|
||||
|
||||
```go
|
||||
func SetDefaults(envName string, forceDefault bool, CustomConfig interface{}, NoBoilerPlate bool, ConfigUpdate ...*config.Config) (*config.Config, error)
|
||||
```
|
||||
|
||||
SetDefaults This function to be called only during a make install
|
||||
|
||||
<a name="SetEnvName"></a>
|
||||
## func [SetEnvName](<https://github.com/Akilan1999/p2p-rendering-computation/blob/master/config/generate/generate.go#L26>)
|
||||
|
||||
```go
|
||||
func SetEnvName(EnvName string) error
|
||||
```
|
||||
|
||||
SetEnvName Sets the environment name This is to ensure that the Path of your project is detected from your environment variable This is useful when extending the use case of P2PRC
|
||||
|
||||
<a name="String"></a>
|
||||
## func [String](<https://github.com/Akilan1999/p2p-rendering-computation/blob/master/config/generate/generate.go#L176>)
|
||||
|
||||
```go
|
||||
func String(length int) string
|
||||
```
|
||||
|
||||
|
||||
|
||||
<a name="StringWithCharset"></a>
|
||||
## func [StringWithCharset](<https://github.com/Akilan1999/p2p-rendering-computation/blob/master/config/generate/generate.go#L168>)
|
||||
|
||||
```go
|
||||
func StringWithCharset(length int, charset string) string
|
||||
```
|
||||
|
||||
|
||||
|
||||
<a name="AuthorizedKey"></a>
|
||||
## type [AuthorizedKey](<https://github.com/Akilan1999/p2p-rendering-computation/blob/master/config/generate/generateFiles.go#L230-L233>)
|
||||
|
||||
AuthorizedKey struct represents the structure of an authorized key
|
||||
|
||||
```go
|
||||
type AuthorizedKey struct {
|
||||
Username string
|
||||
Key string
|
||||
}
|
||||
```
|
||||
|
||||
Generated by [gomarkdoc](<https://github.com/princjef/gomarkdoc>)
|
||||
Reference in New Issue
Block a user