netmaker/pro/util.go
Vishal Dalwadi 71fa5013d0
NM-145: Cost Per Network (#3685)
* feat(go): report per network usage as well;

* feat(go): move usage model and logic out of ee;
2025-10-24 09:53:33 +04:00

23 lines
406 B
Go

//go:build ee
// +build ee
package pro
import (
"encoding/base64"
)
// base64encode - base64 encode helper function
func base64encode(input []byte) string {
return base64.StdEncoding.EncodeToString(input)
}
// base64decode - base64 decode helper function
func base64decode(input string) []byte {
bytes, err := base64.StdEncoding.DecodeString(input)
if err != nil {
return nil
}
return bytes
}