Open labkode opened 4 years ago
In pkg/storage/pw/context/context.go we can add a new config like:
type config struct { Layout string `mapstructure:"layout"` Prefix string `mapstructure:"prefix"` }
and then on the Wrap and Unwrap methods there is some string substitution.
For example:
[x.y.z] layout = "{{.Provider}}/{{.Username}}"
And the we use Go templates to fill those variables:
u := context.GetUser(ctx) t := template.Must(template.New("").Parse(conf.Layout))
How about https://github.com/cs3org/reva/pull/476 ?
In pkg/storage/pw/context/context.go we can add a new config like:
and then on the Wrap and Unwrap methods there is some string substitution.
For example:
And the we use Go templates to fill those variables: