github.com/infraboard/keyauth@v0.8.1/apps/tag/pb/tag.proto (about) 1 syntax = "proto3"; 2 3 package infraboard.keyauth.tag; 4 option go_package = "github.com/infraboard/keyauth/apps/tag"; 5 6 import "apps/tag/pb/enum.proto"; 7 import "apps/tag/pb/request.proto"; 8 9 // Tag is 标签 10 message TagKey { 11 // Tag ID 12 // @gotags: bson:"_id" json:"id" 13 string id = 1; 14 // 创建时间 15 // @gotags: bson:"create_at" json:"create_at" 16 int64 create_at = 2; 17 // 更新时间 18 // @gotags: bson:"update_at" json:"update_at" 19 int64 update_at = 3; 20 // Tag所属的域 21 // @gotags: bson:"domain" json:"domain" 22 string domain = 4; 23 // 创建人 24 // @gotags: bson:"creater" json:"creater" 25 string creater = 5; 26 // tag生效范围 27 // @gotags: bson:"scope_type" json:"scope_type" 28 ScopeType scope_type = 6; 29 // tag属于哪个namespace 30 // @gotags: bson:"namespace" json:"namespace" 31 string namespace = 7; 32 // 建名称 33 // @gotags: bson:"key_name" json:"key_name" 34 string key_name = 8; 35 // 建标识 36 // @gotags: bson:"key_label" json:"key_label" 37 string key_label = 9; 38 // 建描述 39 // @gotags: bson:"key_desc" json:"key_desc" 40 string key_desc = 10; 41 // 值来源 42 // @gotags: bson:"value_from" json:"value_from" 43 ValueFrom value_from = 11; 44 // http 获取Tag 值的参数 45 // @gotags: bson:"http_from_option" json:"http_from_option,omitempty" 46 HTTPFromOption http_from_option = 12; 47 // @gotags: bson:"-" json:"values,omitempty" 48 repeated TagValue values = 13; 49 } 50 51 message TagValue { 52 // Tag Value ID 53 // @gotags: bson:"_id" json:"id" 54 string id = 1; 55 // 创建时间 56 // @gotags: bson:"create_at" json:"create_at" 57 int64 create_at = 2; 58 // 更新时间 59 // @gotags: bson:"update_at" json:"update_at" 60 int64 update_at = 3; 61 // 创建人 62 // @gotags: bson:"creater" json:"creater" 63 string creater = 4; 64 // 关联的Tag key 65 // @gotags: bson:"key_id" json:"key_id" 66 string key_id = 5; 67 // String 类型的值 68 // @gotags: bson:"value" json:"value" 69 ValueOption value = 6; 70 } 71 72 message TagKeySet { 73 // @gotags: bson:"total" json:"total" 74 int64 total = 1; 75 // @gotags: bson:"items" json:"items" 76 repeated TagKey items = 2; 77 } 78 79 message TagValueSet { 80 // @gotags: bson:"total" json:"total" 81 int64 total = 1; 82 // @gotags: bson:"items" json:"items" 83 repeated TagValue items = 2; 84 }