mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-26 14:28:46 +00:00
feat: localized messages (#328)
* fix: project by id loads project from view and from eventstore * fix: correct search key for role * feat(auth): my user changes * fix: improve error handling in change converters * fix: log-id * feat(translations): event type translations * feat: localized translations * fix(translations): correct yaml format * chore: example * fix: remove unused code * correct checkSSL in sql * chore(modules): update * chore: refactor interceptors * fix: improvments * Update internal/static/i18n/de.yaml Co-authored-by: Florian Forster <[email protected]> * Update internal/static/i18n/de.yaml Co-authored-by: Florian Forster <[email protected]> * Update internal/static/i18n/de.yaml Co-authored-by: Florian Forster <[email protected]> * Update internal/static/i18n/de.yaml Co-authored-by: Florian Forster <[email protected]> * Update internal/static/i18n/de.yaml Co-authored-by: Florian Forster <[email protected]> * Update internal/static/i18n/de.yaml Co-authored-by: Florian Forster <[email protected]> * Update internal/static/i18n/en.yaml Co-authored-by: Florian Forster <[email protected]> * Update internal/static/i18n/en.yaml Co-authored-by: Florian Forster <[email protected]> * Update internal/static/i18n/en.yaml Co-authored-by: Florian Forster <[email protected]> * Update internal/static/i18n/en.yaml Co-authored-by: Florian Forster <[email protected]> * Update internal/static/i18n/en.yaml Co-authored-by: Florian Forster <[email protected]> * Update internal/static/i18n/de.yaml Co-authored-by: Florian Forster <[email protected]> * Update internal/static/i18n/de.yaml Co-authored-by: Florian Forster <[email protected]> * Update internal/static/i18n/de.yaml Co-authored-by: Florian Forster <[email protected]> * Update internal/static/i18n/de.yaml Co-authored-by: Florian Forster <[email protected]> * Update internal/static/i18n/de.yaml Co-authored-by: Florian Forster <[email protected]> * Update internal/static/i18n/de.yaml Co-authored-by: Florian Forster <[email protected]> * Update internal/static/i18n/de.yaml Co-authored-by: Florian Forster <[email protected]> * Update internal/static/i18n/de.yaml Co-authored-by: Florian Forster <[email protected]> * Update internal/static/i18n/en.yaml Co-authored-by: Florian Forster <[email protected]> * chore(translations): start with upper case on Code * chore(middleware): move funcs * add message to grpc web generation * translation in mgmt and fixes * fix authoptions * fix console statik Co-authored-by: Florian Forster <[email protected]> Co-authored-by: Livio Amstutz <[email protected]>
This commit is contained in:
co-authored by
Florian Forster
Livio Amstutz
parent
b863e7c407
commit
c0f85c2733
+2144
-3886
File diff suppressed because it is too large
Load Diff
+990
-30
File diff suppressed because it is too large
Load Diff
@@ -621,7 +621,7 @@
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/protobufStruct"
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -632,19 +632,6 @@
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"protobufListValue": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"values": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/protobufValue"
|
||||
},
|
||||
"description": "Repeated field of dynamically typed values."
|
||||
}
|
||||
},
|
||||
"description": "`ListValue` is a wrapper around a repeated field of values.\n\nThe JSON representation for `ListValue` is JSON array."
|
||||
},
|
||||
"protobufNullValue": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
@@ -653,51 +640,6 @@
|
||||
"default": "NULL_VALUE",
|
||||
"description": "`NullValue` is a singleton enumeration to represent the null value for the\n`Value` type union.\n\n The JSON representation for `NullValue` is JSON `null`.\n\n - NULL_VALUE: Null value."
|
||||
},
|
||||
"protobufStruct": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"fields": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"$ref": "#/definitions/protobufValue"
|
||||
},
|
||||
"description": "Unordered map of dynamically typed values."
|
||||
}
|
||||
},
|
||||
"description": "`Struct` represents a structured data value, consisting of fields\nwhich map to dynamically typed values. In some languages, `Struct`\nmight be supported by a native representation. For example, in\nscripting languages like JS a struct is represented as an\nobject. The details of that representation are described together\nwith the proto support for the language.\n\nThe JSON representation for `Struct` is JSON object."
|
||||
},
|
||||
"protobufValue": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"null_value": {
|
||||
"$ref": "#/definitions/protobufNullValue",
|
||||
"description": "Represents a null value."
|
||||
},
|
||||
"number_value": {
|
||||
"type": "number",
|
||||
"format": "double",
|
||||
"description": "Represents a double value."
|
||||
},
|
||||
"string_value": {
|
||||
"type": "string",
|
||||
"description": "Represents a string value."
|
||||
},
|
||||
"bool_value": {
|
||||
"type": "boolean",
|
||||
"format": "boolean",
|
||||
"description": "Represents a boolean value."
|
||||
},
|
||||
"struct_value": {
|
||||
"$ref": "#/definitions/protobufStruct",
|
||||
"description": "Represents a structured value."
|
||||
},
|
||||
"list_value": {
|
||||
"$ref": "#/definitions/protobufListValue",
|
||||
"description": "Represents a repeated `Value`."
|
||||
}
|
||||
},
|
||||
"description": "`Value` represents a dynamically typed value which can be either\nnull, a number, a string, a boolean, a recursive struct value, or a\nlist of values. A producer of value is expected to set one of that\nvariants, absence of any variant indicates an error.\n\nThe JSON representation for `Value` is JSON value."
|
||||
},
|
||||
"v1Change": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -706,7 +648,7 @@
|
||||
"format": "date-time"
|
||||
},
|
||||
"event_type": {
|
||||
"type": "string"
|
||||
"$ref": "#/definitions/v1LocalizedMessage"
|
||||
},
|
||||
"sequence": {
|
||||
"type": "string",
|
||||
@@ -719,7 +661,7 @@
|
||||
"type": "string"
|
||||
},
|
||||
"data": {
|
||||
"$ref": "#/definitions/protobufStruct"
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -752,6 +694,17 @@
|
||||
],
|
||||
"default": "GENDER_UNSPECIFIED"
|
||||
},
|
||||
"v1LocalizedMessage": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"key": {
|
||||
"type": "string"
|
||||
},
|
||||
"localized_message": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1MFAState": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
package grpc
|
||||
|
||||
import "github.com/caos/zitadel/internal/api/grpc/server/middleware"
|
||||
|
||||
func (c *Changes) Localizers() []middleware.Localizer {
|
||||
localizers := make([]middleware.Localizer, len(c.Changes))
|
||||
for i, change := range c.Changes {
|
||||
localizers[i] = change.EventType
|
||||
}
|
||||
return localizers
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package grpc
|
||||
|
||||
//go:generate protoc -I$GOPATH/src -I../proto -I$GOPATH/src/github.com/grpc-ecosystem/grpc-gateway -I$GOPATH/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis -I${GOPATH}/src/github.com/envoyproxy/protoc-gen-validate -I${GOPATH}/src/github.com/caos/zitadel/internal/protoc/protoc-gen-authoption --go_out=plugins=grpc:$GOPATH/src --grpc-gateway_out=logtostderr=true:$GOPATH/src --swagger_out=logtostderr=true:. --authoption_out=. ../proto/auth.proto
|
||||
//go:generate protoc -I${GOPATH}/src -I../proto -I${GOPATH}/src/github.com/caos/zitadel/pkg/message -I${GOPATH}/src/github.com/grpc-ecosystem/grpc-gateway -I${GOPATH}/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis -I${GOPATH}/src/github.com/envoyproxy/protoc-gen-validate -I${GOPATH}/src/github.com/caos/zitadel/internal/protoc/protoc-gen-authoption --go_out=plugins=grpc:${GOPATH}/src --grpc-gateway_out=logtostderr=true:${GOPATH}/src --swagger_out=logtostderr=true:. --authoption_out=. ../proto/auth.proto
|
||||
//go:generate mockgen -package api -destination ./mock/auth.proto.mock.go github.com/caos/zitadel/pkg/auth/api/grpc AuthServiceClient
|
||||
|
||||
@@ -41,6 +41,7 @@ func (s *Server) GRPCServer(defaults systemdefaults.SystemDefaults) (*grpc.Serve
|
||||
grpc.UnaryInterceptor(
|
||||
grpc_middleware.ChainUnaryServer(
|
||||
middleware.ErrorHandler(defaults.DefaultLanguage),
|
||||
middleware.TranslationHandler(defaults.DefaultLanguage),
|
||||
AuthService_Authorization_Interceptor(s.verifier, &s.authZ),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -8,6 +8,7 @@ import (
|
||||
"github.com/caos/zitadel/internal/api/auth"
|
||||
"github.com/caos/zitadel/internal/eventstore/models"
|
||||
usr_model "github.com/caos/zitadel/internal/user/model"
|
||||
message "github.com/caos/zitadel/pkg/message"
|
||||
"github.com/golang/protobuf/ptypes"
|
||||
"golang.org/x/text/language"
|
||||
"google.golang.org/protobuf/encoding/protojson"
|
||||
@@ -343,11 +344,11 @@ func userChangesToResponse(response *usr_model.UserChanges, offset uint64, limit
|
||||
return &Changes{
|
||||
Limit: limit,
|
||||
Offset: offset,
|
||||
Changes: userChangesToMgtAPI(response),
|
||||
Changes: userChangesToAPI(response),
|
||||
}
|
||||
}
|
||||
|
||||
func userChangesToMgtAPI(changes *usr_model.UserChanges) (_ []*Change) {
|
||||
func userChangesToAPI(changes *usr_model.UserChanges) (_ []*Change) {
|
||||
result := make([]*Change, len(changes.Changes))
|
||||
|
||||
for i, change := range changes.Changes {
|
||||
@@ -358,10 +359,9 @@ func userChangesToMgtAPI(changes *usr_model.UserChanges) (_ []*Change) {
|
||||
err = protojson.Unmarshal(changedData, data)
|
||||
logging.Log("GRPC-0kRsY").OnError(err).Debug("unable to marshal changed data to struct")
|
||||
}
|
||||
|
||||
result[i] = &Change{
|
||||
ChangeDate: change.ChangeDate,
|
||||
EventType: change.EventType,
|
||||
EventType: message.NewLocalizedEventType(change.EventType),
|
||||
Sequence: change.Sequence,
|
||||
Data: data,
|
||||
EditorId: change.ModifierId,
|
||||
|
||||
@@ -7,6 +7,7 @@ import "google/protobuf/timestamp.proto";
|
||||
import "validate/validate.proto";
|
||||
import "protoc-gen-swagger/options/annotations.proto";
|
||||
import "authoption/options.proto";
|
||||
import "message.proto";
|
||||
|
||||
package caos.zitadel.auth.api.v1;
|
||||
|
||||
@@ -668,7 +669,7 @@ message Changes {
|
||||
|
||||
message Change {
|
||||
google.protobuf.Timestamp change_date = 1;
|
||||
string event_type = 2;
|
||||
caos.zitadel.api.v1.LocalizedMessage event_type = 2;
|
||||
uint64 sequence = 3;
|
||||
string editor_id = 4;
|
||||
string editor = 5;
|
||||
|
||||
@@ -7,6 +7,8 @@ import (
|
||||
"github.com/caos/zitadel/internal/eventstore/models"
|
||||
"github.com/caos/zitadel/internal/model"
|
||||
proj_model "github.com/caos/zitadel/internal/project/model"
|
||||
"github.com/caos/zitadel/pkg/message"
|
||||
|
||||
"github.com/golang/protobuf/ptypes"
|
||||
"google.golang.org/protobuf/encoding/protojson"
|
||||
"google.golang.org/protobuf/types/known/structpb"
|
||||
@@ -335,7 +337,7 @@ func appChangesToMgtAPI(changes *proj_model.ApplicationChanges) (_ []*Change) {
|
||||
}
|
||||
result[i] = &Change{
|
||||
ChangeDate: change.ChangeDate,
|
||||
EventType: change.EventType,
|
||||
EventType: message.NewLocalizedEventType(change.EventType),
|
||||
Sequence: change.Sequence,
|
||||
Editor: change.ModifierName,
|
||||
EditorId: change.ModifierId,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package grpc
|
||||
|
||||
//go:generate protoc -I$GOPATH/src -I../proto -I$GOPATH/src/github.com/grpc-ecosystem/grpc-gateway -I$GOPATH/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis -I${GOPATH}/src/github.com/envoyproxy/protoc-gen-validate -I${GOPATH}/src/github.com/caos/zitadel/internal/protoc/protoc-gen-authoption --go_out=plugins=grpc:$GOPATH/src --grpc-gateway_out=logtostderr=true,allow_delete_body=true:$GOPATH/src --swagger_out=logtostderr=true,allow_delete_body=true:. --authoption_out=:. ../proto/management.proto
|
||||
//go:generate protoc -I${GOPATH}/src -I../proto -I${GOPATH}/src/github.com/caos/zitadel/pkg/message -I${GOPATH}/src/github.com/grpc-ecosystem/grpc-gateway -I${GOPATH}/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis -I${GOPATH}/src/github.com/envoyproxy/protoc-gen-validate -I${GOPATH}/src/github.com/caos/zitadel/internal/protoc/protoc-gen-authoption --go_out=plugins=grpc:${GOPATH}/src --grpc-gateway_out=logtostderr=true,allow_delete_body=true:${GOPATH}/src --swagger_out=logtostderr=true,allow_delete_body=true:. --authoption_out=. ../proto/management.proto
|
||||
//go:generate mockgen -package api -destination ./mock/management.proto.mock.go github.com/caos/zitadel/pkg/management/api/grpc ManagementServiceClient
|
||||
|
||||
+7277
-13843
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -3570,7 +3570,7 @@
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/protobufStruct"
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -3581,19 +3581,6 @@
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"protobufListValue": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"values": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/protobufValue"
|
||||
},
|
||||
"description": "Repeated field of dynamically typed values."
|
||||
}
|
||||
},
|
||||
"description": "`ListValue` is a wrapper around a repeated field of values.\n\nThe JSON representation for `ListValue` is JSON array."
|
||||
},
|
||||
"protobufNullValue": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
@@ -3602,51 +3589,6 @@
|
||||
"default": "NULL_VALUE",
|
||||
"description": "`NullValue` is a singleton enumeration to represent the null value for the\n`Value` type union.\n\n The JSON representation for `NullValue` is JSON `null`.\n\n - NULL_VALUE: Null value."
|
||||
},
|
||||
"protobufStruct": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"fields": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"$ref": "#/definitions/protobufValue"
|
||||
},
|
||||
"description": "Unordered map of dynamically typed values."
|
||||
}
|
||||
},
|
||||
"description": "`Struct` represents a structured data value, consisting of fields\nwhich map to dynamically typed values. In some languages, `Struct`\nmight be supported by a native representation. For example, in\nscripting languages like JS a struct is represented as an\nobject. The details of that representation are described together\nwith the proto support for the language.\n\nThe JSON representation for `Struct` is JSON object."
|
||||
},
|
||||
"protobufValue": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"null_value": {
|
||||
"$ref": "#/definitions/protobufNullValue",
|
||||
"description": "Represents a null value."
|
||||
},
|
||||
"number_value": {
|
||||
"type": "number",
|
||||
"format": "double",
|
||||
"description": "Represents a double value."
|
||||
},
|
||||
"string_value": {
|
||||
"type": "string",
|
||||
"description": "Represents a string value."
|
||||
},
|
||||
"bool_value": {
|
||||
"type": "boolean",
|
||||
"format": "boolean",
|
||||
"description": "Represents a boolean value."
|
||||
},
|
||||
"struct_value": {
|
||||
"$ref": "#/definitions/protobufStruct",
|
||||
"description": "Represents a structured value."
|
||||
},
|
||||
"list_value": {
|
||||
"$ref": "#/definitions/protobufListValue",
|
||||
"description": "Represents a repeated `Value`."
|
||||
}
|
||||
},
|
||||
"description": "`Value` represents a dynamically typed value which can be either\nnull, a number, a string, a boolean, a recursive struct value, or a\nlist of values. A producer of value is expected to set one of that\nvariants, absence of any variant indicates an error.\n\nThe JSON representation for `Value` is JSON value."
|
||||
},
|
||||
"v1AddOrgDomainRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -3836,7 +3778,7 @@
|
||||
"format": "date-time"
|
||||
},
|
||||
"event_type": {
|
||||
"type": "string"
|
||||
"$ref": "#/definitions/v1LocalizedMessage"
|
||||
},
|
||||
"sequence": {
|
||||
"type": "string",
|
||||
@@ -3849,7 +3791,7 @@
|
||||
"type": "string"
|
||||
},
|
||||
"data": {
|
||||
"$ref": "#/definitions/protobufStruct"
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -3997,6 +3939,17 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1LocalizedMessage": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"key": {
|
||||
"type": "string"
|
||||
},
|
||||
"localized_message": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1MFAState": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
|
||||
@@ -5,6 +5,8 @@ import (
|
||||
|
||||
"github.com/caos/logging"
|
||||
org_model "github.com/caos/zitadel/internal/org/model"
|
||||
"github.com/caos/zitadel/pkg/message"
|
||||
|
||||
"github.com/golang/protobuf/ptypes"
|
||||
"google.golang.org/protobuf/encoding/protojson"
|
||||
"google.golang.org/protobuf/types/known/structpb"
|
||||
@@ -171,7 +173,7 @@ func orgChangesToMgtAPI(changes *org_model.OrgChanges) (_ []*Change) {
|
||||
}
|
||||
result[i] = &Change{
|
||||
ChangeDate: change.ChangeDate,
|
||||
EventType: change.EventType,
|
||||
EventType: message.NewLocalizedEventType(change.EventType),
|
||||
Sequence: change.Sequence,
|
||||
Data: data,
|
||||
Editor: change.ModifierName,
|
||||
|
||||
@@ -6,6 +6,8 @@ import (
|
||||
"github.com/caos/logging"
|
||||
"github.com/caos/zitadel/internal/eventstore/models"
|
||||
proj_model "github.com/caos/zitadel/internal/project/model"
|
||||
"github.com/caos/zitadel/pkg/message"
|
||||
|
||||
"github.com/golang/protobuf/ptypes"
|
||||
"google.golang.org/protobuf/encoding/protojson"
|
||||
"google.golang.org/protobuf/types/known/structpb"
|
||||
@@ -287,7 +289,7 @@ func projectChangesToMgtAPI(changes *proj_model.ProjectChanges) (_ []*Change) {
|
||||
}
|
||||
result[i] = &Change{
|
||||
ChangeDate: change.ChangeDate,
|
||||
EventType: change.EventType,
|
||||
EventType: message.NewLocalizedEventType(change.EventType),
|
||||
Sequence: change.Sequence,
|
||||
Editor: change.ModifierName,
|
||||
EditorId: change.ModifierId,
|
||||
|
||||
@@ -52,6 +52,7 @@ func (s *Server) GRPCServer(defaults systemdefaults.SystemDefaults) (*grpc.Serve
|
||||
grpc.UnaryInterceptor(
|
||||
grpc_middleware.ChainUnaryServer(
|
||||
middleware.ErrorHandler(defaults.DefaultLanguage),
|
||||
middleware.TranslationHandler(defaults.DefaultLanguage),
|
||||
ManagementService_Authorization_Interceptor(s.verifier, &s.authZ),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -6,6 +6,8 @@ import (
|
||||
"github.com/caos/logging"
|
||||
"github.com/caos/zitadel/internal/eventstore/models"
|
||||
usr_model "github.com/caos/zitadel/internal/user/model"
|
||||
"github.com/caos/zitadel/pkg/message"
|
||||
|
||||
"github.com/golang/protobuf/ptypes"
|
||||
"golang.org/x/text/language"
|
||||
"google.golang.org/protobuf/encoding/protojson"
|
||||
@@ -504,7 +506,7 @@ func userChangesToMgtAPI(changes *usr_model.UserChanges) (_ []*Change) {
|
||||
|
||||
result[i] = &Change{
|
||||
ChangeDate: change.ChangeDate,
|
||||
EventType: change.EventType,
|
||||
EventType: message.NewLocalizedEventType(change.EventType),
|
||||
Sequence: change.Sequence,
|
||||
Data: data,
|
||||
EditorId: change.ModifierId,
|
||||
|
||||
@@ -8,6 +8,7 @@ import "protoc-gen-swagger/options/annotations.proto";
|
||||
import "validate/validate.proto";
|
||||
import "google/protobuf/descriptor.proto";
|
||||
import "authoption/options.proto";
|
||||
import "message.proto";
|
||||
|
||||
package caos.zitadel.management.api.v1;
|
||||
|
||||
@@ -1382,7 +1383,7 @@ message Changes {
|
||||
|
||||
message Change {
|
||||
google.protobuf.Timestamp change_date = 1;
|
||||
string event_type = 2;
|
||||
caos.zitadel.api.v1.LocalizedMessage event_type = 2;
|
||||
uint64 sequence = 3;
|
||||
string editor_id = 4;
|
||||
string editor = 5;
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
package message
|
||||
|
||||
//go:generate protoc -I$GOPATH/src -I. --go_out=plugins=grpc:$GOPATH/src --grpc-gateway_out=logtostderr=true,allow_delete_body=true:$GOPATH/src ./message.proto
|
||||
@@ -0,0 +1,13 @@
|
||||
package message
|
||||
|
||||
func (m *LocalizedMessage) LocalizationKey() string {
|
||||
return m.Key
|
||||
}
|
||||
|
||||
func (m *LocalizedMessage) SetLocalizedMessage(message string) {
|
||||
m.LocalizedMessage = message
|
||||
}
|
||||
|
||||
func NewLocalizedEventType(key string) *LocalizedMessage {
|
||||
return &LocalizedMessage{Key: "EventTypes." + key}
|
||||
}
|
||||
@@ -0,0 +1,138 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// source: message.proto
|
||||
|
||||
package message
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
math "math"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the proto package it is being compiled against.
|
||||
// A compilation error at this line likely means your copy of the
|
||||
// proto package needs to be updated.
|
||||
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
type ErrorDetail struct {
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *ErrorDetail) Reset() { *m = ErrorDetail{} }
|
||||
func (m *ErrorDetail) String() string { return proto.CompactTextString(m) }
|
||||
func (*ErrorDetail) ProtoMessage() {}
|
||||
func (*ErrorDetail) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_33c57e4bae7b9afd, []int{0}
|
||||
}
|
||||
|
||||
func (m *ErrorDetail) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_ErrorDetail.Unmarshal(m, b)
|
||||
}
|
||||
func (m *ErrorDetail) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_ErrorDetail.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *ErrorDetail) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_ErrorDetail.Merge(m, src)
|
||||
}
|
||||
func (m *ErrorDetail) XXX_Size() int {
|
||||
return xxx_messageInfo_ErrorDetail.Size(m)
|
||||
}
|
||||
func (m *ErrorDetail) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_ErrorDetail.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_ErrorDetail proto.InternalMessageInfo
|
||||
|
||||
func (m *ErrorDetail) GetId() string {
|
||||
if m != nil {
|
||||
return m.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *ErrorDetail) GetMessage() string {
|
||||
if m != nil {
|
||||
return m.Message
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type LocalizedMessage struct {
|
||||
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
|
||||
LocalizedMessage string `protobuf:"bytes,2,opt,name=localized_message,json=localizedMessage,proto3" json:"localized_message,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *LocalizedMessage) Reset() { *m = LocalizedMessage{} }
|
||||
func (m *LocalizedMessage) String() string { return proto.CompactTextString(m) }
|
||||
func (*LocalizedMessage) ProtoMessage() {}
|
||||
func (*LocalizedMessage) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_33c57e4bae7b9afd, []int{1}
|
||||
}
|
||||
|
||||
func (m *LocalizedMessage) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_LocalizedMessage.Unmarshal(m, b)
|
||||
}
|
||||
func (m *LocalizedMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_LocalizedMessage.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *LocalizedMessage) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_LocalizedMessage.Merge(m, src)
|
||||
}
|
||||
func (m *LocalizedMessage) XXX_Size() int {
|
||||
return xxx_messageInfo_LocalizedMessage.Size(m)
|
||||
}
|
||||
func (m *LocalizedMessage) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_LocalizedMessage.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_LocalizedMessage proto.InternalMessageInfo
|
||||
|
||||
func (m *LocalizedMessage) GetKey() string {
|
||||
if m != nil {
|
||||
return m.Key
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *LocalizedMessage) GetLocalizedMessage() string {
|
||||
if m != nil {
|
||||
return m.LocalizedMessage
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*ErrorDetail)(nil), "caos.zitadel.api.v1.ErrorDetail")
|
||||
proto.RegisterType((*LocalizedMessage)(nil), "caos.zitadel.api.v1.LocalizedMessage")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("message.proto", fileDescriptor_33c57e4bae7b9afd) }
|
||||
|
||||
var fileDescriptor_33c57e4bae7b9afd = []byte{
|
||||
// 177 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xcd, 0x4d, 0x2d, 0x2e,
|
||||
0x4e, 0x4c, 0x4f, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x4e, 0x4e, 0xcc, 0x2f, 0xd6,
|
||||
0xab, 0xca, 0x2c, 0x49, 0x4c, 0x49, 0xcd, 0xd1, 0x4b, 0x2c, 0xc8, 0xd4, 0x2b, 0x33, 0x54, 0x32,
|
||||
0xe7, 0xe2, 0x76, 0x2d, 0x2a, 0xca, 0x2f, 0x72, 0x49, 0x2d, 0x49, 0xcc, 0xcc, 0x11, 0xe2, 0xe3,
|
||||
0x62, 0xca, 0x4c, 0x91, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x0c, 0x62, 0xca, 0x4c, 0x11, 0x92, 0xe0,
|
||||
0x62, 0x87, 0x1a, 0x22, 0xc1, 0x04, 0x16, 0x84, 0x71, 0x95, 0x02, 0xb9, 0x04, 0x7c, 0xf2, 0x93,
|
||||
0x13, 0x73, 0x32, 0xab, 0x52, 0x53, 0x7c, 0x21, 0x62, 0x42, 0x02, 0x5c, 0xcc, 0xd9, 0xa9, 0x95,
|
||||
0x50, 0xed, 0x20, 0xa6, 0x90, 0x36, 0x97, 0x60, 0x0e, 0x4c, 0x55, 0x3c, 0xaa, 0x49, 0x02, 0x39,
|
||||
0x68, 0xda, 0x9d, 0x54, 0xa3, 0x94, 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73,
|
||||
0xf5, 0x41, 0xae, 0xd5, 0x87, 0xba, 0x56, 0xbf, 0x20, 0x3b, 0x5d, 0x1f, 0xaa, 0x3d, 0x89, 0x0d,
|
||||
0xec, 0x1d, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0xec, 0x22, 0xc0, 0xff, 0xdf, 0x00, 0x00,
|
||||
0x00,
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package caos.zitadel.api.v1;
|
||||
|
||||
option go_package = "github.com/caos/zitadel/pkg/message";
|
||||
|
||||
message ErrorDetail {
|
||||
string id = 1;
|
||||
string message = 2;
|
||||
}
|
||||
|
||||
message LocalizedMessage {
|
||||
string key = 1;
|
||||
string localized_message = 2;
|
||||
}
|
||||
Reference in New Issue
Block a user