func (s Secret) ModeValue() uint32 {
	mode := s.Mode
	if mode == "" {
		mode = "0440"
	}
	modeValue, err := strconv.ParseUint(mode, 8  , 16  )
	if err != nil {
		log.Printf("Unable to convert secret mode (%v) to octal, using '0440': %v\n", mode, err)
		modeValue = 0440
	}
	return uint32(modeValue | unix.S_IFREG)
}
ModeValue function helps by converting a textual mode to the expected value for fuse.
package main
import (
	"encoding/base64"
	"encoding/json"
	"fmt"
	"log"
	"strconv"
	"strings"
	"time"
	"golang.org/x/sys/unix"
)
func ParseSecret(data []byte) (s *Secret, err error) {
	if err = json.Unmarshal(data, &s); err != nil {
		return nil, fmt.Errorf("Fail to deserialize JSON Secret: %v", err)
	}
	return
}
func ParseSecretList(data []byte) (secrets []Secret, err error) {
	if err = json.Unmarshal(data, &secrets); err != nil {
		return nil, fmt.Errorf("Fail to deserialize JSON []Secret: %v", err)
	}
	return
}
type Secret struct {
	Name        string
	Content     content   `json:"secret"`
	Length      uint64    `json:"secretLength"`
	CreatedAt   time.Time `json:"creationDate"`
	IsVersioned bool
	Mode        string
	Owner       string
	Group       string
}