# 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>)
## func [Copy]()
```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
## func [CreateIPTableFolderStructure]()
```go
func CreateIPTableFolderStructure() (err error)
```
CreateIPTableFolderStructure Create folder structure for IPTable
## func [FileExists]()
```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
## func [GenerateCertificate]()
```go
func GenerateCertificate() error
```
## func [GenerateClientTrackContainers]()
```go
func GenerateClientTrackContainers() (err error)
```
## func [GenerateDockerFiles]()
```go
func GenerateDockerFiles() (err error)
```
GenerateDockerFiles Generate default docker files
## func [GenerateFiles]()
```go
func GenerateFiles(rootNodes ...p2p.IpAddress) (err error)
```
GenerateFiles Generates all the files needed to setup P2PRC
## func [GenerateIPTableFile]()
```go
func GenerateIPTableFile(rootNodes []p2p.IpAddress) (err error)
```
GenerateIPTableFile Generates the IPTable file with the appropirate root node
## func [GeneratePluginDirectory]()
```go
func GeneratePluginDirectory() (err error)
```
GeneratePluginDirectory Generates plugin directory structure
## func [GetPathP2PRC]()
```go
func GetPathP2PRC() (string, error)
```
GetPathP2PRC Getting P2PRC Directory from environment variable
## func [MakeSSHKeyPair]()
```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
## func [SetDefaults]()
```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
## 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
## func [String]()
```go
func String(length int) string
```
## func [StringWithCharset]()
```go
func StringWithCharset(length int, charset string) string
```
## type [AuthorizedKey]()
AuthorizedKey struct represents the structure of an authorized key
```go
type AuthorizedKey struct {
Username string
Key string
}
```
Generated by [gomarkdoc]()