fix: generate proto files

This commit is contained in:
Fabiennne
2020-03-23 16:56:02 +01:00
parent bf3b770700
commit e55b137455
20 changed files with 42146 additions and 13 deletions

View File

@@ -68,7 +68,7 @@ func (fi bindataFileInfo) Sys() interface{} {
return nil
}
var _templatesAuth_method_mappingGoTmpl = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x8c\x92\xc1\x6e\xdb\x30\x0c\x86\xcf\xd3\x53\x10\x86\x0f\x8d\x91\x4a\xd8\x35\x40\x0f\x43\xba\x0e\x3d\xb4\x09\xb0\x6c\xd7\x40\xb5\x19\x59\x88\x2d\x09\x92\x1c\xa0\x15\xf4\xee\x83\x6c\x67\x76\xd2\x0c\x98\x4f\xb2\xc8\x9f\x3f\x3f\x8a\x8c\xc1\x5a\x57\x08\x02\x15\x5a\xee\xb1\x82\xb7\x77\x30\x56\x7b\x5d\xde\x0b\x54\xf7\xbc\xf3\x75\x8b\xbe\xd6\x15\x85\xc7\x0d\xbc\x6e\x76\xf0\xfd\xf1\x79\x47\x09\x31\xbc\x3c\x72\x81\x10\x02\x7d\x92\x0d\xd2\x1f\x7a\x7b\x14\xf4\x95\xb7\x18\x23\x21\x44\xb6\x46\x5b\x0f\x77\x04\x00\x20\x13\x5a\x8b\x06\xa9\xd0\x0d\x57\x82\x6a\x2b\x98\xb0\xa6\xcc\xfa\x20\xf9\xd2\x79\xd9\xb8\x7d\xb2\x82\x4c\x48\x5f\x77\x6f\xb4\xd4\x2d\x2b\xb9\x76\xec\x43\x7a\x5e\x61\xc3\xa4\xf2\x68\x15\x6f\x18\x37\x92\xb1\x94\x9b\x9d\x85\xa9\xd4\x7f\x0a\x07\xd7\x05\x21\x21\x80\xe5\x4a\x20\xe4\x0e\x56\x0f\x30\x20\xfc\x44\x7b\x92\x25\x3a\x48\x04\xac\x28\x08\x14\x10\x42\xee\xce\x54\x50\x30\x42\x4e\xdc\xce\x2f\xf7\xdf\x3a\x5f\xbf\xf4\x13\x72\xf0\x00\x13\x0a\x9d\x02\x2f\xdc\x18\xa9\x04\x84\x9e\x77\xb2\x6e\x93\x75\xee\xe8\x90\x95\x0c\xc6\x2f\x04\xc8\xdb\xa4\xdf\x18\x9f\x72\xb4\xf1\x52\x2b\xc8\x5b\xba\xe9\x4f\x0e\xb2\xc4\x48\x47\x46\xda\xbb\xd2\xd3\x57\x9a\x8c\xf7\x43\x76\x06\x97\x05\xe5\x01\xb8\xaa\x66\x75\xff\x9e\xe8\x16\x6d\x2b\x9d\x4b\x16\x33\x4d\xff\x70\x2c\x84\x7c\x18\xce\x76\x78\xef\x18\xe9\x8c\x9e\x85\x30\x9e\xb2\xd5\x35\xfb\xd0\x6a\xb8\xa8\x97\xbe\xc9\x6d\x05\x59\x08\xb7\xda\x88\x31\x5b\x7e\xd2\xad\x6b\x2c\x8f\x5b\x6e\x79\x7b\xa5\xeb\x03\x4f\x12\x9b\x6a\x6c\xe5\x52\x1b\x97\xb3\x31\xa0\x3a\xcf\x39\x04\x18\x7e\x22\x21\x87\x4e\x95\x9f\x1e\x55\x5b\xf9\xc1\x13\xc2\xfe\x39\xad\x50\x89\xc6\x6b\x7b\x77\x42\x2b\x0f\x12\xed\x9c\x76\xa7\x8f\xa8\x7e\x8f\x81\x25\xa4\xbb\xb5\x56\x07\x28\xae\x26\x92\x2e\xa5\x58\x40\xda\x42\xfa\x4b\x71\xfb\x9e\x36\x0e\xed\xac\xfe\xb8\x23\x16\x7d\x67\x15\x4c\xfb\x4d\x2f\x3a\xba\xd5\xd0\xe4\xbb\xfc\xd7\x7e\x2e\x12\xeb\xc0\x0d\x31\xfe\x09\x00\x00\xff\xff\x12\xdf\x14\x2b\xfb\x03\x00\x00")
var _templatesAuth_method_mappingGoTmpl = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x8c\x92\xc1\x6e\xdb\x30\x0c\x86\xcf\xd3\x53\x10\x86\x0f\x4d\x90\x4a\xd8\x35\x40\x0f\x43\xba\x0e\x3d\xb4\x09\xb0\x6c\xd7\x40\xb5\x19\x45\x88\x2d\x09\x92\x1c\xa0\x15\xf4\xee\x03\x6d\x67\x71\xd6\x0e\xa8\x4f\x32\x45\xfe\x3f\x3f\x8a\x42\xc0\xca\xd6\x08\x0a\x0d\x7a\x19\xb1\x86\x97\x57\x70\xde\x46\x5b\xdd\x2a\x34\xb7\xb2\x8b\x87\x16\xe3\xc1\xd6\x1c\xee\xd7\xf0\xbc\xde\xc2\xf7\xfb\xc7\x2d\x67\xcc\xc9\xea\x28\x15\x42\x4a\xfc\x41\x37\xc8\x7f\xd8\xcd\x51\xf1\x67\xd9\x62\xce\x8c\x31\xdd\x3a\xeb\x23\xdc\x30\x00\x80\x42\x59\xab\x1a\xe4\xca\x36\xd2\x28\x6e\xbd\x12\xca\xbb\xaa\xe8\x2f\xd9\x97\x2e\xea\x26\xec\xc8\x0a\x0a\xa5\xe3\xa1\x7b\xe1\x95\x6d\x45\x25\x6d\x10\x6f\x3a\xca\x1a\x1b\xa1\x4d\x44\x6f\x64\x23\xa4\xd3\x82\x52\x8b\x73\x1d\x29\x7d\xb2\x6e\x30\x9d\x31\x96\x12\x78\x69\x14\x42\x19\x60\x79\x07\x03\xc1\x4f\xf4\x27\x5d\x61\x00\x02\x10\xf3\x39\x83\x39\xa4\x54\x86\x33\x14\xcc\x05\x63\x27\xe9\xa7\xc1\xdd\xb7\x2e\x1e\x9e\xfa\x01\x05\xb8\x83\x0b\x09\x1f\x82\x4f\xd2\x39\x6d\x14\xa4\x1e\xf5\x62\xdb\x92\x6d\x19\xc6\x2c\x12\x1f\xbf\x94\xa0\x6c\x49\x74\xed\x22\xe5\x58\x17\xb5\x35\x50\xb6\x7c\xdd\x9f\x02\x14\xc4\xc7\x47\x3e\xde\x3b\xf2\xd3\x57\x4e\xa6\xbb\x21\xbb\x80\x6b\x41\xbd\x07\x69\xea\x89\xee\xdf\x13\xdf\xa0\x6f\x75\x08\x64\x31\xa9\xe9\xdf\x4c\xa4\x54\x0e\x83\xd9\x0c\x4f\x9d\x33\x9f\x90\x8b\x94\xc6\x53\xb1\x9c\x72\x0f\x6d\xa6\x2b\x2d\xfa\x2e\x4e\x4b\x28\x52\xfa\xa8\x85\x9c\x8b\xc5\xbb\xba\xd5\x01\xab\xe3\x46\x7a\xd9\xfe\x53\xd7\x5f\x3c\x68\x6c\xea\xb1\x8d\xeb\xda\xbc\x98\x8c\x00\xcd\x79\xc6\x29\xc1\xf0\x93\x19\xdb\x77\xa6\x7a\xf7\x98\xd6\xeb\x37\x49\x08\xbb\x47\x5a\x9d\x0a\x5d\xb4\xfe\xe6\x84\x5e\xef\x35\xfa\x29\xe9\xd6\x1e\xd1\xfc\x1e\x2f\x16\x40\xb1\x95\x35\x7b\x98\x4f\x72\x28\xa0\xd5\x0c\x68\xf3\xf8\x2f\x23\xfd\x2b\x6d\x19\xfa\x89\xf6\xb8\x1b\x1e\x63\xe7\x0d\x5c\x76\x9a\x5f\x75\xf3\x51\x33\x17\xcf\xc5\xff\x76\x72\x46\x9c\x03\x33\xe4\xfc\x27\x00\x00\xff\xff\xb4\x5d\x04\x73\xee\x03\x00\x00")
func templatesAuth_method_mappingGoTmplBytes() ([]byte, error) {
return bindataRead(
@@ -83,7 +83,7 @@ func templatesAuth_method_mappingGoTmpl() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "templates/auth_method_mapping.go.tmpl", size: 1019, mode: os.FileMode(420), modTime: time.Unix(1584977173, 0)}
info := bindataFileInfo{name: "templates/auth_method_mapping.go.tmpl", size: 1006, mode: os.FileMode(420), modTime: time.Unix(1584978801, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}

View File

@@ -6,7 +6,7 @@ package {{.File.GoPkg.Name}}
import (
"google.golang.org/grpc"
utils_auth "github.com/caos/zitadel/internal/api//auth"
utils_auth "github.com/caos/zitadel/internal/api/auth"
utils_grpc "github.com/caos/zitadel/internal/api/grpc"
)
@@ -16,11 +16,11 @@ import (
* {{$s.Name}}
*/
var {{$s.Name}}_AuthMethods = utils_auth.AuthMethodMapping {
var {{$s.Name}}_AuthMethods = utils_auth.MethodMapping {
{{ range $m := $s.Method}}
{{ $mAuthOpt := option $m.Options "caos.zitadel.utils.v1.auth_option" }}
{{ if and $mAuthOpt $mAuthOpt.Permission }}
"/{{$.File.Package}}.{{$s.Name}}/{{.Name}}": utils_auth.AuthOption{
"/{{$.File.Package}}.{{$s.Name}}/{{.Name}}": utils_auth.Option{
Permission: "{{$mAuthOpt.Permission}}",
CheckParam: "{{$mAuthOpt.CheckFieldName}}",
},
@@ -28,7 +28,7 @@ var {{$s.Name}}_AuthMethods = utils_auth.AuthMethodMapping {
{{ end}}
}
func {{$s.Name}}_Authorization_Interceptor(verifier utils_auth.TokenVerifier, authConf *utils_auth.AuthConfig) grpc.UnaryServerInterceptor {
func {{$s.Name}}_Authorization_Interceptor(verifier utils_auth.TokenVerifier, authConf *utils_auth.Config) grpc.UnaryServerInterceptor {
return utils_grpc.AuthorizationInterceptor(verifier, authConf, {{$s.Name}}_AuthMethods)
}