李伟乐 2 years ago
parent 824706362f
commit ed2c180cc9
  1. 6
      api/user.http.go
  2. 34
      api/user.pb.go
  3. 2
      api/user.ts
  4. 10
      api/user_http.pb.go
  5. 8
      cmd/kit/main.go
  6. 2
      encoding/encoding.go
  7. 16
      example/main.go
  8. 11
      middleware/jwt/jwt.go
  9. 6
      proto/user.proto
  10. 60
      third_party/auth/auth.pb.go

@ -1,16 +1,16 @@
package user package user
import ( import (
"github.com/gin-gonic/gin"
"context" "context"
"git.diulo.com/mogfee/kit/middleware" "git.diulo.com/mogfee/kit/middleware"
"git.diulo.com/mogfee/kit/errors" "git.diulo.com/mogfee/kit/errors"
"git.diulo.com/mogfee/kit/response" "git.diulo.com/mogfee/kit/response"
"github.com/gin-gonic/gin"
) )
func RegisterUserHandler(app *gin.Engine, srv UserServer, m ...middleware.Middleware) { func RegisterUserHandler(app *gin.Engine, srv UserServer, m ...middleware.Middleware) {
app.GET("/api/v1/user/list", httpListHandler(srv, m...)) app.GET("/api/v1/user/list", httpListHandler(srv, m...))
app.POST("/api/v1/user/login", httpLoginHandler(srv, m...)) app.GET("/api/v1/user/login", httpLoginHandler(srv, m...))
} }
func httpListHandler(srv UserServer, m ...middleware.Middleware) func(c *gin.Context) { func httpListHandler(srv UserServer, m ...middleware.Middleware) func(c *gin.Context) {
return func(c *gin.Context) { return func(c *gin.Context) {
@ -39,7 +39,7 @@ func httpLoginHandler(srv UserServer, m ...middleware.Middleware) func(c *gin.Co
return func(c *gin.Context) { return func(c *gin.Context) {
var post LoginRequest var post LoginRequest
resp := response.New(c) resp := response.New(c)
if err := resp.BindJSON(&post); err != nil { if err := resp.BindQuery(&post); err != nil {
resp.Error(err) resp.Error(err)
return return
} }

@ -157,26 +157,26 @@ var file_user_proto_rawDesc = []byte{
0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x66, 0x69, 0x72, 0x73, 0x74, 0x4e, 0x61, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x66, 0x69, 0x72, 0x73, 0x74, 0x4e, 0x61,
0x6d, 0x65, 0x22, 0x25, 0x0a, 0x0d, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6d, 0x65, 0x22, 0x25, 0x0a, 0x0d, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x32, 0x9a, 0x02, 0x0a, 0x04, 0x75, 0x73, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x32, 0x9c, 0x02, 0x0a, 0x04, 0x75, 0x73,
0x65, 0x72, 0x12, 0x6a, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x1b, 0x2e, 0x63, 0x6f, 0x6d, 0x65, 0x72, 0x12, 0x68, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x1b, 0x2e, 0x63, 0x6f, 0x6d,
0x2e, 0x64, 0x69, 0x75, 0x6c, 0x6f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x2e, 0x64, 0x69, 0x75, 0x6c, 0x6f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6c, 0x6f, 0x67, 0x69, 0x6e,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x69, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x69,
0x75, 0x6c, 0x6f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x6f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0xba, 0x45, 0x0b, 0x75, 0x73, 0x65, 0x72, 0x3a, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0xba, 0x45, 0x09, 0x75, 0x73, 0x65, 0x72, 0x3a, 0x6c,
0x65, 0x61, 0x72, 0x63, 0x68, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x12, 0x11, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x74, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x12, 0x11, 0x2f, 0x61, 0x70, 0x69, 0x2f,
0x69, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x61, 0x76, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x65, 0x0a, 0x05,
0x0a, 0x05, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x1b, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x69, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x1b, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x69, 0x75, 0x6c,
0x75, 0x6c, 0x6f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x6f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x69, 0x75, 0x6c, 0x6f, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x69, 0x75, 0x6c, 0x6f, 0x2e, 0x61,
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x70, 0x69, 0x2e, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x22, 0x12, 0x2f, 0x61, 0x70, 0x69, 0x22, 0x21, 0xba, 0x45, 0x04, 0x6e, 0x6f, 0x6e, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12,
0x2f, 0x76, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x3a, 0x01, 0x12, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x6c, 0x6f,
0x2a, 0x12, 0x43, 0x0a, 0x06, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x1b, 0x2e, 0x63, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x43, 0x0a, 0x06, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x1b, 0x2e,
0x6d, 0x2e, 0x64, 0x69, 0x75, 0x6c, 0x6f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6c, 0x6f, 0x67, 0x69, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x69, 0x75, 0x6c, 0x6f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6c, 0x6f,
0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x63, 0x6f, 0x6d,
0x69, 0x75, 0x6c, 0x6f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x2e, 0x64, 0x69, 0x75, 0x6c, 0x6f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6c, 0x6f, 0x67, 0x69, 0x6e,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x09, 0x5a, 0x07, 0x2e, 0x2f, 0x3b, 0x75, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x09, 0x5a, 0x07, 0x2e, 0x2f, 0x3b, 0x75,
0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x73, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
var ( var (

@ -26,7 +26,7 @@ export class userService{
return http<loginRequest, loginResponse>('/api/v1/user/login', { return http<loginRequest, loginResponse>('/api/v1/user/login', {
...param, ...param,
data: data, data: data,
method:'POST' method:'GET'
}) })
} }
} }

@ -15,14 +15,14 @@ type UserHTTPServer interface {
func RegisterUserHTTPServer(s *http.Server, srv UserServer) { func RegisterUserHTTPServer(s *http.Server, srv UserServer) {
r := s.Route("/") r := s.Route("/")
r.GET("/api/v1/user/list", _User_List0_HTTP_Handler(srv)) r.GET("/api/v1/user/list", _User_List0_HTTP_Handler(srv))
r.POST("/api/v1/user/login", _User_Login0_HTTP_Handler(srv)) r.GET("/api/v1/user/login", _User_Login0_HTTP_Handler(srv))
} }
func _User_List0_HTTP_Handler(srv UserHTTPServer) func(ctx http.Context) error { func _User_List0_HTTP_Handler(srv UserHTTPServer) func(ctx http.Context) error {
return func(ctx http.Context) error { return func(ctx http.Context) error {
var in LoginRequest var in LoginRequest
//user:search //user:list
var newCtx context.Context = ctx var newCtx context.Context = ctx
newCtx = jwt.SetAuthKeyContext(ctx, "user:search") newCtx = jwt.SetAuthKeyContext(ctx, "user:list")
if err := ctx.BindQuery(&in); err != nil { if err := ctx.BindQuery(&in); err != nil {
return err return err
} }
@ -41,8 +41,10 @@ func _User_List0_HTTP_Handler(srv UserHTTPServer) func(ctx http.Context) error {
func _User_Login0_HTTP_Handler(srv UserHTTPServer) func(ctx http.Context) error { func _User_Login0_HTTP_Handler(srv UserHTTPServer) func(ctx http.Context) error {
return func(ctx http.Context) error { return func(ctx http.Context) error {
var in LoginRequest var in LoginRequest
// none
var newCtx context.Context = ctx var newCtx context.Context = ctx
if err := ctx.Bind(&in); err != nil { newCtx = jwt.SetAuthKeyContext(ctx, "none")
if err := ctx.BindQuery(&in); err != nil {
return err return err
} }
http.SetOperation(ctx, "/com.diulo.api.user/login") http.SetOperation(ctx, "/com.diulo.api.user/login")

@ -98,7 +98,7 @@ func (u *Kit) Generate(plugin *protogen.Plugin) error {
} }
func (u *Kit) genGet(f *protogen.File, s *protogen.Service, t *protogen.GeneratedFile, m *protogen.Method) { func (u *Kit) genGet(f *protogen.File, s *protogen.Service, t *protogen.GeneratedFile, m *protogen.Method) {
autkKey := protogen2.GetAuthKey(m) authKey := protogen2.GetAuthKey(m)
method, path := protogen2.GetProtoMethod(m) method, path := protogen2.GetProtoMethod(m)
if method == "" { if method == "" {
return return
@ -108,10 +108,10 @@ func (u *Kit) genGet(f *protogen.File, s *protogen.Service, t *protogen.Generate
return func(ctx http.Context) error { return func(ctx http.Context) error {
var in `, m.Input.GoIdent.GoName) var in `, m.Input.GoIdent.GoName)
t.P("//", protogen2.GetAuthKey(m)) t.P("//", authKey)
t.P(`var newCtx context.Context=ctx`) t.P(`var newCtx context.Context=ctx`)
if autkKey != "" { if authKey != "" {
t.P(`newCtx = jwt.SetAuthKeyContext(ctx, "`, autkKey, `")`) t.P(`newCtx = jwt.SetAuthKeyContext(ctx, "`, authKey, `")`)
} }
if method == protogen2.METHOD_GET { if method == protogen2.METHOD_GET {
t.P(`if err := ctx.BindQuery(&in); err != nil { t.P(`if err := ctx.BindQuery(&in); err != nil {

@ -1,7 +1,6 @@
package encoding package encoding
import ( import (
"fmt"
"strings" "strings"
) )
@ -31,7 +30,6 @@ func RegisterCodec(codec Codec) {
panic("cannot register Codec with empty string result for Name()") panic("cannot register Codec with empty string result for Name()")
} }
contentSubtype := strings.ToLower(codec.Name()) contentSubtype := strings.ToLower(codec.Name())
fmt.Println("reg", contentSubtype)
registeredCodecs[contentSubtype] = codec registeredCodecs[contentSubtype] = codec
} }

@ -10,9 +10,7 @@ import (
"git.diulo.com/mogfee/kit/middleware/jwt" "git.diulo.com/mogfee/kit/middleware/jwt"
"git.diulo.com/mogfee/kit/middleware/logging" "git.diulo.com/mogfee/kit/middleware/logging"
"git.diulo.com/mogfee/kit/middleware/validate" "git.diulo.com/mogfee/kit/middleware/validate"
"git.diulo.com/mogfee/kit/registry/etcd"
"git.diulo.com/mogfee/kit/transport/http" "git.diulo.com/mogfee/kit/transport/http"
clientv3 "go.etcd.io/etcd/client/v3"
) )
var host string var host string
@ -53,18 +51,18 @@ func runApp(host string) {
//}) //})
user.RegisterUserHTTPServer(hs, &service.UserService{}) user.RegisterUserHTTPServer(hs, &service.UserService{})
client, err := clientv3.New(clientv3.Config{ //client, err := clientv3.New(clientv3.Config{
Endpoints: []string{"127.0.0.1:2379"}, // Endpoints: []string{"127.0.0.1:2379"},
}) //})
if err != nil { //if err != nil {
panic(err) // panic(err)
} //}
app := kit.New( app := kit.New(
kit.Name("kit-server"), kit.Name("kit-server"),
kit.Version("v1.0"), kit.Version("v1.0"),
kit.ID(host), kit.ID(host),
kit.Server(hs), kit.Server(hs),
kit.Registrar(etcd.New(client)), //kit.Registrar(etcd.New(client)),
) )
fmt.Println(app.Run()) fmt.Println(app.Run())
fmt.Println(app.Stop()) fmt.Println(app.Stop())

@ -8,6 +8,10 @@ import (
"git.diulo.com/mogfee/kit/transport" "git.diulo.com/mogfee/kit/transport"
) )
const (
permissionNoCheck = "none"
)
type userIdKey struct{} type userIdKey struct{}
type authKey struct { type authKey struct {
} }
@ -48,6 +52,12 @@ func JWT(opts ...JwtOption) middleware.Middleware {
return func(handler middleware.Handler) middleware.Handler { return func(handler middleware.Handler) middleware.Handler {
return func(ctx context.Context, a any) (any, error) { return func(ctx context.Context, a any) (any, error) {
permission := FromAuthKeyContext(ctx)
if permission == permissionNoCheck {
return handler(ctx, a)
}
var tokenStr string var tokenStr string
if tr, ok := transport.FromServerContext(ctx); ok { if tr, ok := transport.FromServerContext(ctx); ok {
tokenStr = tr.RequestHeader().Get("token") tokenStr = tr.RequestHeader().Get("token")
@ -56,7 +66,6 @@ func JWT(opts ...JwtOption) middleware.Middleware {
if err != nil { if err != nil {
return nil, err return nil, err
} }
permission := FromAuthKeyContext(ctx)
if permission != "" { if permission != "" {
if !cfg.validatePermission(userInfo.Permissions, permission) { if !cfg.validatePermission(userInfo.Permissions, permission) {
return nil, errors.Unauthorized("TOKEN_PERMISSION_BAD", "") return nil, errors.Unauthorized("TOKEN_PERMISSION_BAD", "")

@ -12,16 +12,16 @@ import "google/protobuf/descriptor.proto";
service user{ service user{
// //
rpc list(loginRequest)returns(loginResponse){ rpc list(loginRequest)returns(loginResponse){
option(auth.auth_key) = "user:search"; option(auth.auth_key) = "user:list";
option(google.api.http) = { option(google.api.http) = {
get:"/api/v1/user/list" get:"/api/v1/user/list"
}; };
} }
// //
rpc login(loginRequest)returns(loginResponse){ rpc login(loginRequest)returns(loginResponse){
option(auth.auth_key) = "none";
option (google.api.http) = { option (google.api.http) = {
post: "/api/v1/user/login", get: "/api/v1/user/login",
body:"*"
}; };
} }
rpc delete(loginRequest)returns(loginResponse); rpc delete(loginRequest)returns(loginResponse);

@ -2,7 +2,7 @@
// versions: // versions:
// protoc-gen-go v1.28.1 // protoc-gen-go v1.28.1
// protoc v3.17.3 // protoc v3.17.3
// source: third_party/auth/auth.proto // source: auth.proto
package auth package auth
@ -20,43 +20,43 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
) )
var file_third_party_auth_auth_proto_extTypes = []protoimpl.ExtensionInfo{ var file_auth_proto_extTypes = []protoimpl.ExtensionInfo{
{ {
ExtendedType: (*descriptorpb.MethodOptions)(nil), ExtendedType: (*descriptorpb.MethodOptions)(nil),
ExtensionType: (*string)(nil), ExtensionType: (*string)(nil),
Field: 1111, Field: 1111,
Name: "auth.auth_key", Name: "auth.auth_key",
Tag: "bytes,1111,opt,name=auth_key", Tag: "bytes,1111,opt,name=auth_key",
Filename: "third_party/auth/auth.proto", Filename: "auth.proto",
}, },
} }
// Extension fields to descriptorpb.MethodOptions. // Extension fields to descriptorpb.MethodOptions.
var ( var (
// optional string auth_key = 1111; // optional string auth_key = 1111;
E_AuthKey = &file_third_party_auth_auth_proto_extTypes[0] E_AuthKey = &file_auth_proto_extTypes[0]
) )
var File_third_party_auth_auth_proto protoreflect.FileDescriptor var File_auth_proto protoreflect.FileDescriptor
var file_third_party_auth_auth_proto_rawDesc = []byte{ var file_auth_proto_rawDesc = []byte{
0x0a, 0x1b, 0x74, 0x68, 0x69, 0x72, 0x64, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x79, 0x2f, 0x61, 0x75, 0x0a, 0x0a, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x04, 0x61, 0x75,
0x74, 0x68, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x04, 0x61, 0x74, 0x68, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x75, 0x74, 0x68, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70,
0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x72, 0x6f, 0x74, 0x6f, 0x3a, 0x3a, 0x0a, 0x08, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x6b, 0x65, 0x79,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3a, 0x3a, 0x0a, 0x08, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x6b, 0x65, 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
0x79, 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73,
0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xd7, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x75, 0x74, 0x68, 0x4b, 0x65, 0x79,
0x73, 0x18, 0xd7, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x75, 0x74, 0x68, 0x4b, 0x65, 0x42, 0x2b, 0x5a, 0x29, 0x67, 0x69, 0x74, 0x2e, 0x64, 0x69, 0x75, 0x6c, 0x6f, 0x2e, 0x63, 0x6f,
0x79, 0x42, 0x17, 0x5a, 0x15, 0x74, 0x68, 0x69, 0x72, 0x64, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x79, 0x6d, 0x2f, 0x6d, 0x6f, 0x67, 0x66, 0x65, 0x65, 0x2f, 0x6b, 0x69, 0x74, 0x2f, 0x74, 0x68, 0x69,
0x2f, 0x61, 0x75, 0x74, 0x68, 0x3b, 0x61, 0x75, 0x74, 0x68, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x72, 0x64, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x79, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x62, 0x06, 0x70,
0x6f, 0x33, 0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
var file_third_party_auth_auth_proto_goTypes = []interface{}{ var file_auth_proto_goTypes = []interface{}{
(*descriptorpb.MethodOptions)(nil), // 0: google.protobuf.MethodOptions (*descriptorpb.MethodOptions)(nil), // 0: google.protobuf.MethodOptions
} }
var file_third_party_auth_auth_proto_depIdxs = []int32{ var file_auth_proto_depIdxs = []int32{
0, // 0: auth.auth_key:extendee -> google.protobuf.MethodOptions 0, // 0: auth.auth_key:extendee -> google.protobuf.MethodOptions
1, // [1:1] is the sub-list for method output_type 1, // [1:1] is the sub-list for method output_type
1, // [1:1] is the sub-list for method input_type 1, // [1:1] is the sub-list for method input_type
@ -65,27 +65,27 @@ var file_third_party_auth_auth_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for field type_name 0, // [0:0] is the sub-list for field type_name
} }
func init() { file_third_party_auth_auth_proto_init() } func init() { file_auth_proto_init() }
func file_third_party_auth_auth_proto_init() { func file_auth_proto_init() {
if File_third_party_auth_auth_proto != nil { if File_auth_proto != nil {
return return
} }
type x struct{} type x struct{}
out := protoimpl.TypeBuilder{ out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{ File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_third_party_auth_auth_proto_rawDesc, RawDescriptor: file_auth_proto_rawDesc,
NumEnums: 0, NumEnums: 0,
NumMessages: 0, NumMessages: 0,
NumExtensions: 1, NumExtensions: 1,
NumServices: 0, NumServices: 0,
}, },
GoTypes: file_third_party_auth_auth_proto_goTypes, GoTypes: file_auth_proto_goTypes,
DependencyIndexes: file_third_party_auth_auth_proto_depIdxs, DependencyIndexes: file_auth_proto_depIdxs,
ExtensionInfos: file_third_party_auth_auth_proto_extTypes, ExtensionInfos: file_auth_proto_extTypes,
}.Build() }.Build()
File_third_party_auth_auth_proto = out.File File_auth_proto = out.File
file_third_party_auth_auth_proto_rawDesc = nil file_auth_proto_rawDesc = nil
file_third_party_auth_auth_proto_goTypes = nil file_auth_proto_goTypes = nil
file_third_party_auth_auth_proto_depIdxs = nil file_auth_proto_depIdxs = nil
} }

Loading…
Cancel
Save