mirror of
https://github.com/gravitl/netmaker.git
synced 2026-02-04 10:09:01 +08:00
* feat(go): report per network usage as well; * feat(go): move usage model and logic out of ee;
23 lines
406 B
Go
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
|
|
}
|