# 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>)
## func [GetCurrentPath]()
```go
func GetCurrentPath() (string, error)
```
GetCurrentPath Getting P2PRC Directory from environment variable
## func [GetEnvName]()
```go
func GetEnvName() string
```
## func [GetPathP2PRC]()
```go
func GetPathP2PRC(Envname string) (string, error)
```
GetPathP2PRC Getting P2PRC Directory from environment variable
## func [SetEnvName]()
```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
## type [Config]()
```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{}
}
```
### func [ConfigInit]()
```go
func ConfigInit(defaultsParameter map[string]interface{}, CustomConfig interface{}, envNameOptional ...string) (*Config, error)
```
ConfigInit Pass environment name as an optional parameter
### func \(\*Config\) [GetPublicKey]()
```go
func (c *Config) GetPublicKey() (string, error)
```
GetPublicKey Gets public key of the current machine based on the path provided on the config file
### func \(\*Config\) [WriteConfig]()
```go
func (c *Config) WriteConfig() error
```
Generated by [gomarkdoc]()