resource_model

package
v1.2.87 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 4, 2024 License: MIT Imports: 8 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AuditLogMapperInstance = NewAuditLogMapper()
View Source
var AuditLogResource = &model.Resource{
	Name:      "AuditLog",
	Namespace: "system",
	Properties: []*model.ResourceProperty{
		{
			Name:         "id",
			Type:         model.ResourceProperty_UUID,
			Required:     true,
			Immutable:    true,
			ExampleValue: structpb.NewStringValue("a39621a4-6d48-11ee-b962-0242ac120002"),

			Annotations: map[string]string{
				"SpecialProperty": "true",
				"PrimaryProperty": "true",
			},
		},
		{
			Name:         "version",
			Type:         model.ResourceProperty_INT32,
			Required:     true,
			DefaultValue: structpb.NewNumberValue(1),
			ExampleValue: structpb.NewNumberValue(1),

			Annotations: map[string]string{
				"SpecialProperty":     "true",
				"AllowEmptyPrimitive": "true",
			},
		},
		{
			Name:     "namespace",
			Type:     model.ResourceProperty_STRING,
			Length:   256,
			Required: true,
		},
		{
			Name:     "resource",
			Type:     model.ResourceProperty_STRING,
			Length:   256,
			Required: true,
		},
		{
			Name:     "recordId",
			Type:     model.ResourceProperty_STRING,
			Length:   256,
			Required: true,

			Annotations: map[string]string{
				"SourceDef": "record_id",
			},
		},
		{
			Name:     "time",
			Type:     model.ResourceProperty_TIMESTAMP,
			Required: true,
		},
		{
			Name:     "username",
			Type:     model.ResourceProperty_STRING,
			Required: true,
		},
		{
			Name:     "operation",
			Type:     model.ResourceProperty_ENUM,
			Required: true,
		},
		{
			Name: "properties",
			Type: model.ResourceProperty_OBJECT,
		},
		{
			Name:         "annotations",
			Type:         model.ResourceProperty_MAP,
			ExampleValue: structpb.NewStructValue(&structpb.Struct{Fields: map[string]*structpb.Value{"CheckVersion": structpb.NewStringValue("true"), "IgnoreIfExists": structpb.NewStringValue("true"), "CommonType": structpb.NewStringValue("testType")}}),

			Annotations: map[string]string{
				"SpecialProperty": "true",
			},
		},
	},
	Immutable: true,

	Annotations: map[string]string{
		"OpenApiGroup":     "internal",
		"BypassExtensions": "true",
	},
}
View Source
var BooleanExpressionMapperInstance = NewBooleanExpressionMapper()
View Source
var ChannelCallMapperInstance = NewChannelCallMapper()
View Source
var DataSourceAuditDataMapperInstance = NewDataSourceAuditDataMapper()
View Source
var DataSourceMapperInstance = NewDataSourceMapper()
View Source
var DataSourceResource = &model.Resource{
	Name:      "DataSource",
	Namespace: "system",
	Types: []*model.ResourceSubType{
		{
			Name:        "AuditData",
			Title:       "Audit Data",
			Description: "Audit Data is a type that represents the audit data of a resource/record. ",
			Properties: []*model.ResourceProperty{
				{
					Name:         "createdBy",
					Type:         model.ResourceProperty_STRING,
					Length:       256,
					Immutable:    true,
					ExampleValue: structpb.NewStringValue("admin"),

					Annotations: map[string]string{
						"SpecialProperty": "true",
					},
				},
				{
					Name:         "updatedBy",
					Type:         model.ResourceProperty_STRING,
					Length:       256,
					ExampleValue: structpb.NewStringValue("admin"),

					Annotations: map[string]string{
						"SpecialProperty": "true",
					},
				},
				{
					Name:         "createdOn",
					Type:         model.ResourceProperty_TIMESTAMP,
					Immutable:    true,
					ExampleValue: structpb.NewStringValue("2024-01-03T15:02:45+04:00"),

					Annotations: map[string]string{
						"SpecialProperty": "true",
					},
				},
				{
					Name:         "updatedOn",
					Type:         model.ResourceProperty_TIMESTAMP,
					ExampleValue: structpb.NewStringValue("2024-01-03T15:02:45+04:00"),

					Annotations: map[string]string{
						"SpecialProperty": "true",
					},
				},
			},

			Annotations: map[string]string{
				"EnableAudit":  "true",
				"OpenApiGroup": "internal",
			},
		},
	},
	Properties: []*model.ResourceProperty{
		{
			Name:         "id",
			Type:         model.ResourceProperty_UUID,
			Required:     true,
			Immutable:    true,
			ExampleValue: structpb.NewStringValue("a39621a4-6d48-11ee-b962-0242ac120002"),

			Annotations: map[string]string{
				"SpecialProperty": "true",
				"PrimaryProperty": "true",
			},
		},
		{
			Name:         "version",
			Type:         model.ResourceProperty_INT32,
			Required:     true,
			DefaultValue: structpb.NewNumberValue(1),
			ExampleValue: structpb.NewNumberValue(1),

			Annotations: map[string]string{
				"SpecialProperty":     "true",
				"AllowEmptyPrimitive": "true",
			},
		},
		{
			Name:         "auditData",
			Type:         model.ResourceProperty_STRUCT,
			ExampleValue: structpb.NewStructValue(&structpb.Struct{Fields: map[string]*structpb.Value{"createdBy": structpb.NewStringValue("admin"), "updatedBy": structpb.NewStringValue("admin"), "createdOn": structpb.NewStringValue("2024-01-03T15:02:45+04:00"), "updatedOn": structpb.NewStringValue("2024-01-03T15:02:45+04:00")}}),

			Annotations: map[string]string{
				"SpecialProperty": "true",
			},
		},
		{
			Name:     "name",
			Type:     model.ResourceProperty_STRING,
			Length:   64,
			Required: true,
			Unique:   true,

			Annotations: map[string]string{
				"IsHclLabel": "true",
			},
		},
		{
			Name:   "description",
			Type:   model.ResourceProperty_STRING,
			Length: 64,

			Annotations: map[string]string{
				"AllowEmptyPrimitive": "true",
			},
		},
		{
			Name:     "backend",
			Type:     model.ResourceProperty_ENUM,
			Required: true,
		},
		{
			Name:     "options",
			Type:     model.ResourceProperty_MAP,
			Required: true,
		},
	},

	Annotations: map[string]string{
		"EnableAudit":  "true",
		"OpenApiGroup": "internal",
	},
}
View Source
var ErrorFieldMapperInstance = NewErrorFieldMapper()
View Source
var ErrorMapperInstance = NewErrorMapper()
View Source
var EventMapperInstance = NewEventMapper()
View Source
var EventSelectorMapperInstance = NewEventSelectorMapper()
View Source
var ExpressionMapperInstance = NewExpressionMapper()
View Source
var ExtensionAuditDataMapperInstance = NewExtensionAuditDataMapper()
View Source
var ExtensionMapperInstance = NewExtensionMapper()
View Source
var ExtensionResource = &model.Resource{
	Name:      "Extension",
	Namespace: "system",
	Types: []*model.ResourceSubType{
		{
			Name: "BooleanExpression",
			Properties: []*model.ResourceProperty{
				{
					Name: "and",
					Type: model.ResourceProperty_LIST,
				},
				{
					Name: "or",
					Type: model.ResourceProperty_LIST,
				},
				{
					Name: "not",
					Type: model.ResourceProperty_STRUCT,
				},
				{
					Name: "equal",
					Type: model.ResourceProperty_STRUCT,
				},
				{
					Name: "lessThan",
					Type: model.ResourceProperty_STRUCT,
				},
				{
					Name: "greaterThan",
					Type: model.ResourceProperty_STRUCT,
				},
				{
					Name: "lessThanOrEqual",
					Type: model.ResourceProperty_STRUCT,
				},
				{
					Name: "greaterThanOrEqual",
					Type: model.ResourceProperty_STRUCT,
				},
				{
					Name: "in",
					Type: model.ResourceProperty_STRUCT,
				},
				{
					Name: "isNull",
					Type: model.ResourceProperty_STRUCT,
				},
				{
					Name: "regexMatch",
					Type: model.ResourceProperty_STRUCT,
				},
			},

			Annotations: map[string]string{
				"EnableAudit":  "true",
				"OpenApiGroup": "internal",
			},
		},
		{
			Name: "PairExpression",
			Properties: []*model.ResourceProperty{
				{
					Name: "left",
					Type: model.ResourceProperty_STRUCT,
				},
				{
					Name: "right",
					Type: model.ResourceProperty_STRUCT,
				},
			},

			Annotations: map[string]string{
				"EnableAudit":  "true",
				"OpenApiGroup": "internal",
			},
		},
		{
			Name: "RegexMatchExpression",
			Properties: []*model.ResourceProperty{
				{
					Name: "pattern",
					Type: model.ResourceProperty_STRING,
				},
				{
					Name: "expression",
					Type: model.ResourceProperty_STRUCT,
				},
			},

			Annotations: map[string]string{
				"EnableAudit":  "true",
				"OpenApiGroup": "internal",
			},
		},
		{
			Name: "Expression",
			Properties: []*model.ResourceProperty{
				{
					Name: "property",
					Type: model.ResourceProperty_STRING,
				},
				{
					Name: "value",
					Type: model.ResourceProperty_OBJECT,
				},
			},

			Annotations: map[string]string{
				"OpenApiGroup": "internal",
				"EnableAudit":  "true",
			},
		},
		{
			Name:        "AuditData",
			Title:       "Audit Data",
			Description: "Audit Data is a type that represents the audit data of a resource/record. ",
			Properties: []*model.ResourceProperty{
				{
					Name:         "createdBy",
					Type:         model.ResourceProperty_STRING,
					Length:       256,
					Immutable:    true,
					ExampleValue: structpb.NewStringValue("admin"),

					Annotations: map[string]string{
						"SpecialProperty": "true",
					},
				},
				{
					Name:         "updatedBy",
					Type:         model.ResourceProperty_STRING,
					Length:       256,
					ExampleValue: structpb.NewStringValue("admin"),

					Annotations: map[string]string{
						"SpecialProperty": "true",
					},
				},
				{
					Name:         "createdOn",
					Type:         model.ResourceProperty_TIMESTAMP,
					Immutable:    true,
					ExampleValue: structpb.NewStringValue("2024-01-03T15:02:45+04:00"),

					Annotations: map[string]string{
						"SpecialProperty": "true",
					},
				},
				{
					Name:         "updatedOn",
					Type:         model.ResourceProperty_TIMESTAMP,
					ExampleValue: structpb.NewStringValue("2024-01-03T15:02:45+04:00"),

					Annotations: map[string]string{
						"SpecialProperty": "true",
					},
				},
			},

			Annotations: map[string]string{
				"EnableAudit":  "true",
				"OpenApiGroup": "internal",
			},
		},
		{
			Name: "FunctionCall",
			Properties: []*model.ResourceProperty{
				{
					Name:     "host",
					Type:     model.ResourceProperty_STRING,
					Required: true,
				},
				{
					Name:     "functionName",
					Type:     model.ResourceProperty_STRING,
					Required: true,
				},
			},

			Annotations: map[string]string{
				"EnableAudit":  "true",
				"OpenApiGroup": "internal",
			},
		},
		{
			Name: "HttpCall",
			Properties: []*model.ResourceProperty{
				{
					Name:     "uri",
					Type:     model.ResourceProperty_STRING,
					Required: true,
				},
				{
					Name:     "method",
					Type:     model.ResourceProperty_STRING,
					Required: true,
				},
			},

			Annotations: map[string]string{
				"EnableAudit":  "true",
				"OpenApiGroup": "internal",
			},
		},
		{
			Name: "ChannelCall",
			Properties: []*model.ResourceProperty{
				{
					Name:     "channelKey",
					Type:     model.ResourceProperty_STRING,
					Required: true,
				},
			},

			Annotations: map[string]string{
				"EnableAudit":  "true",
				"OpenApiGroup": "internal",
			},
		},
		{
			Name: "ExternalCall",
			Properties: []*model.ResourceProperty{
				{
					Name: "functionCall",
					Type: model.ResourceProperty_STRUCT,
				},
				{
					Name: "httpCall",
					Type: model.ResourceProperty_STRUCT,
				},
				{
					Name: "channelCall",
					Type: model.ResourceProperty_STRUCT,
				},
			},

			Annotations: map[string]string{
				"EnableAudit":  "true",
				"OpenApiGroup": "internal",
			},
		},
		{
			Name: "EventSelector",
			Properties: []*model.ResourceProperty{
				{
					Name: "actions",
					Type: model.ResourceProperty_LIST,
				},
				{
					Name: "recordSelector",
					Type: model.ResourceProperty_STRUCT,
				},
				{
					Name: "namespaces",
					Type: model.ResourceProperty_LIST,
				},
				{
					Name: "resources",
					Type: model.ResourceProperty_LIST,
				},
				{
					Name: "ids",
					Type: model.ResourceProperty_LIST,
				},
				{
					Name:         "annotations",
					Type:         model.ResourceProperty_MAP,
					ExampleValue: structpb.NewStructValue(&structpb.Struct{Fields: map[string]*structpb.Value{"CheckVersion": structpb.NewStringValue("true"), "IgnoreIfExists": structpb.NewStringValue("true"), "CommonType": structpb.NewStringValue("testType")}}),

					Annotations: map[string]string{
						"SpecialProperty": "true",
					},
				},
			},

			Annotations: map[string]string{
				"EnableAudit":  "true",
				"OpenApiGroup": "internal",
			},
		},
		{
			Name: "RecordSearchParams",
			Properties: []*model.ResourceProperty{
				{
					Name: "query",
					Type: model.ResourceProperty_STRUCT,
				},
				{
					Name: "limit",
					Type: model.ResourceProperty_INT32,
				},
				{
					Name: "offset",
					Type: model.ResourceProperty_INT32,
				},
				{
					Name: "resolveReferences",
					Type: model.ResourceProperty_LIST,
				},
			},

			Annotations: map[string]string{
				"EnableAudit":  "true",
				"OpenApiGroup": "internal",
			},
		},
		{
			Name: "Event",
			Properties: []*model.ResourceProperty{
				{
					Name:      "id",
					Type:      model.ResourceProperty_STRING,
					Required:  true,
					Immutable: true,
				},
				{
					Name:     "action",
					Type:     model.ResourceProperty_ENUM,
					Required: true,
				},
				{
					Name: "recordSearchParams",
					Type: model.ResourceProperty_STRUCT,
				},
				{
					Name: "actionSummary",
					Type: model.ResourceProperty_STRING,
				},
				{
					Name: "actionDescription",
					Type: model.ResourceProperty_STRING,
				},
				{
					Name: "resource",
					Type: model.ResourceProperty_REFERENCE,
				},
				{
					Name: "records",
					Type: model.ResourceProperty_LIST,
				},
				{
					Name: "finalizes",
					Type: model.ResourceProperty_BOOL,
				},
				{
					Name: "sync",
					Type: model.ResourceProperty_BOOL,
				},
				{
					Name: "time",
					Type: model.ResourceProperty_TIMESTAMP,
				},
				{
					Name: "total",
					Type: model.ResourceProperty_INT64,
				},
				{
					Name: "actionName",
					Type: model.ResourceProperty_STRING,
				},
				{
					Name: "input",
					Type: model.ResourceProperty_OBJECT,
				},
				{
					Name: "output",
					Type: model.ResourceProperty_OBJECT,
				},
				{
					Name:         "annotations",
					Type:         model.ResourceProperty_MAP,
					ExampleValue: structpb.NewStructValue(&structpb.Struct{Fields: map[string]*structpb.Value{"CheckVersion": structpb.NewStringValue("true"), "IgnoreIfExists": structpb.NewStringValue("true"), "CommonType": structpb.NewStringValue("testType")}}),

					Annotations: map[string]string{
						"SpecialProperty": "true",
					},
				},
				{
					Name: "error",
					Type: model.ResourceProperty_STRUCT,
				},
			},

			Annotations: map[string]string{
				"EnableAudit":  "true",
				"OpenApiGroup": "internal",
			},
		},
		{
			Name: "ErrorField",
			Properties: []*model.ResourceProperty{
				{
					Name: "recordId",
					Type: model.ResourceProperty_STRING,
				},
				{
					Name: "property",
					Type: model.ResourceProperty_STRING,
				},
				{
					Name: "message",
					Type: model.ResourceProperty_STRING,
				},
				{
					Name: "value",
					Type: model.ResourceProperty_OBJECT,
				},
			},

			Annotations: map[string]string{
				"EnableAudit":  "true",
				"OpenApiGroup": "internal",
			},
		},
		{
			Name: "Error",
			Properties: []*model.ResourceProperty{
				{
					Name: "code",
					Type: model.ResourceProperty_ENUM,
				},
				{
					Name: "message",
					Type: model.ResourceProperty_STRING,
				},
				{
					Name: "fields",
					Type: model.ResourceProperty_LIST,
				},
			},

			Annotations: map[string]string{
				"EnableAudit":  "true",
				"OpenApiGroup": "internal",
			},
		},
	},
	Properties: []*model.ResourceProperty{
		{
			Name:         "id",
			Type:         model.ResourceProperty_UUID,
			Required:     true,
			Immutable:    true,
			ExampleValue: structpb.NewStringValue("a39621a4-6d48-11ee-b962-0242ac120002"),

			Annotations: map[string]string{
				"SpecialProperty": "true",
				"PrimaryProperty": "true",
			},
		},
		{
			Name:         "version",
			Type:         model.ResourceProperty_INT32,
			Required:     true,
			DefaultValue: structpb.NewNumberValue(1),
			ExampleValue: structpb.NewNumberValue(1),

			Annotations: map[string]string{
				"SpecialProperty":     "true",
				"AllowEmptyPrimitive": "true",
			},
		},
		{
			Name:         "auditData",
			Type:         model.ResourceProperty_STRUCT,
			ExampleValue: structpb.NewStructValue(&structpb.Struct{Fields: map[string]*structpb.Value{"createdOn": structpb.NewStringValue("2024-01-03T15:02:45+04:00"), "updatedOn": structpb.NewStringValue("2024-01-03T15:02:45+04:00"), "createdBy": structpb.NewStringValue("admin"), "updatedBy": structpb.NewStringValue("admin")}}),

			Annotations: map[string]string{
				"SpecialProperty": "true",
			},
		},
		{
			Name:     "name",
			Type:     model.ResourceProperty_STRING,
			Length:   256,
			Required: true,
			Unique:   true,

			Annotations: map[string]string{
				"IsHclLabel": "true",
			},
		},
		{
			Name:   "description",
			Type:   model.ResourceProperty_STRING,
			Length: 1024,
		},
		{
			Name: "selector",
			Type: model.ResourceProperty_STRUCT,
		},
		{
			Name:     "order",
			Type:     model.ResourceProperty_INT32,
			Required: true,
		},
		{
			Name:     "finalizes",
			Type:     model.ResourceProperty_BOOL,
			Required: true,
		},
		{
			Name:     "sync",
			Type:     model.ResourceProperty_BOOL,
			Required: true,
		},
		{
			Name:     "responds",
			Type:     model.ResourceProperty_BOOL,
			Required: true,
		},
		{
			Name:     "call",
			Type:     model.ResourceProperty_STRUCT,
			Required: true,
		},
		{
			Name:         "annotations",
			Type:         model.ResourceProperty_MAP,
			ExampleValue: structpb.NewStructValue(&structpb.Struct{Fields: map[string]*structpb.Value{"CheckVersion": structpb.NewStringValue("true"), "IgnoreIfExists": structpb.NewStringValue("true"), "CommonType": structpb.NewStringValue("testType")}}),

			Annotations: map[string]string{
				"SpecialProperty": "true",
			},
		},
	},

	Annotations: map[string]string{
		"EnableAudit":  "true",
		"OpenApiGroup": "internal",
	},
}
View Source
var ExternalCallMapperInstance = NewExternalCallMapper()
View Source
var FunctionCallMapperInstance = NewFunctionCallMapper()
View Source
var HttpCallMapperInstance = NewHttpCallMapper()
View Source
var NamespaceAuditDataMapperInstance = NewNamespaceAuditDataMapper()
View Source
var NamespaceMapperInstance = NewNamespaceMapper()
View Source
var NamespaceResource = &model.Resource{
	Name:      "Namespace",
	Namespace: "system",
	Types: []*model.ResourceSubType{
		{
			Name:        "AuditData",
			Title:       "Audit Data",
			Description: "Audit Data is a type that represents the audit data of a resource/record. ",
			Properties: []*model.ResourceProperty{
				{
					Name:         "createdBy",
					Type:         model.ResourceProperty_STRING,
					Length:       256,
					Immutable:    true,
					ExampleValue: structpb.NewStringValue("admin"),

					Annotations: map[string]string{
						"SpecialProperty": "true",
					},
				},
				{
					Name:         "updatedBy",
					Type:         model.ResourceProperty_STRING,
					Length:       256,
					ExampleValue: structpb.NewStringValue("admin"),

					Annotations: map[string]string{
						"SpecialProperty": "true",
					},
				},
				{
					Name:         "createdOn",
					Type:         model.ResourceProperty_TIMESTAMP,
					Immutable:    true,
					ExampleValue: structpb.NewStringValue("2024-01-03T15:02:45+04:00"),

					Annotations: map[string]string{
						"SpecialProperty": "true",
					},
				},
				{
					Name:         "updatedOn",
					Type:         model.ResourceProperty_TIMESTAMP,
					ExampleValue: structpb.NewStringValue("2024-01-03T15:02:45+04:00"),

					Annotations: map[string]string{
						"SpecialProperty": "true",
					},
				},
			},

			Annotations: map[string]string{
				"OpenApiGroup": "internal",
				"EnableAudit":  "true",
			},
		},
	},
	Properties: []*model.ResourceProperty{
		{
			Name:         "id",
			Type:         model.ResourceProperty_UUID,
			Required:     true,
			Immutable:    true,
			ExampleValue: structpb.NewStringValue("a39621a4-6d48-11ee-b962-0242ac120002"),

			Annotations: map[string]string{
				"SpecialProperty": "true",
				"PrimaryProperty": "true",
			},
		},
		{
			Name:         "version",
			Type:         model.ResourceProperty_INT32,
			Required:     true,
			DefaultValue: structpb.NewNumberValue(1),
			ExampleValue: structpb.NewNumberValue(1),

			Annotations: map[string]string{
				"SpecialProperty":     "true",
				"AllowEmptyPrimitive": "true",
			},
		},
		{
			Name:         "auditData",
			Type:         model.ResourceProperty_STRUCT,
			ExampleValue: structpb.NewStructValue(&structpb.Struct{Fields: map[string]*structpb.Value{"createdBy": structpb.NewStringValue("admin"), "updatedBy": structpb.NewStringValue("admin"), "createdOn": structpb.NewStringValue("2024-01-03T15:02:45+04:00"), "updatedOn": structpb.NewStringValue("2024-01-03T15:02:45+04:00")}}),

			Annotations: map[string]string{
				"SpecialProperty": "true",
			},
		},
		{
			Name:      "name",
			Type:      model.ResourceProperty_STRING,
			Length:    256,
			Required:  true,
			Unique:    true,
			Immutable: true,

			Annotations: map[string]string{
				"IsHclLabel": "true",
			},
		},
		{
			Name:   "description",
			Type:   model.ResourceProperty_STRING,
			Length: 256,
		},
		{
			Name: "details",
			Type: model.ResourceProperty_OBJECT,
		},
	},

	Annotations: map[string]string{
		"EnableAudit":  "true",
		"OpenApiGroup": "internal",
	},
}
View Source
var PairExpressionMapperInstance = NewPairExpressionMapper()
View Source
var PermissionAuditDataMapperInstance = NewPermissionAuditDataMapper()
View Source
var PermissionMapperInstance = NewPermissionMapper()
View Source
var PermissionResource = &model.Resource{
	Name:        "Permission",
	Namespace:   "system",
	Title:       util.Pointer("Permission"),
	Description: util.Pointer("Permission is a resource that defines the access control rules for resources for users."),
	Types: []*model.ResourceSubType{
		{
			Name:        "AuditData",
			Title:       "Audit Data",
			Description: "Audit Data is a type that represents the audit data of a resource/record. ",
			Properties: []*model.ResourceProperty{
				{
					Name:         "createdBy",
					Type:         model.ResourceProperty_STRING,
					Length:       256,
					Immutable:    true,
					ExampleValue: structpb.NewStringValue("admin"),

					Annotations: map[string]string{
						"SpecialProperty": "true",
					},
				},
				{
					Name:         "updatedBy",
					Type:         model.ResourceProperty_STRING,
					Length:       256,
					ExampleValue: structpb.NewStringValue("admin"),

					Annotations: map[string]string{
						"SpecialProperty": "true",
					},
				},
				{
					Name:         "createdOn",
					Type:         model.ResourceProperty_TIMESTAMP,
					Immutable:    true,
					ExampleValue: structpb.NewStringValue("2024-01-03T15:02:45+04:00"),

					Annotations: map[string]string{
						"SpecialProperty": "true",
					},
				},
				{
					Name:         "updatedOn",
					Type:         model.ResourceProperty_TIMESTAMP,
					ExampleValue: structpb.NewStringValue("2024-01-03T15:02:45+04:00"),

					Annotations: map[string]string{
						"SpecialProperty": "true",
					},
				},
			},

			Annotations: map[string]string{
				"EnableAudit":  "true",
				"OpenApiGroup": "meta",
			},
		},
		{
			Name: "BooleanExpression",
			Properties: []*model.ResourceProperty{
				{
					Name: "and",
					Type: model.ResourceProperty_LIST,
				},
				{
					Name: "or",
					Type: model.ResourceProperty_LIST,
				},
				{
					Name: "not",
					Type: model.ResourceProperty_STRUCT,
				},
				{
					Name: "equal",
					Type: model.ResourceProperty_STRUCT,
				},
				{
					Name: "lessThan",
					Type: model.ResourceProperty_STRUCT,
				},
				{
					Name: "greaterThan",
					Type: model.ResourceProperty_STRUCT,
				},
				{
					Name: "lessThanOrEqual",
					Type: model.ResourceProperty_STRUCT,
				},
				{
					Name: "greaterThanOrEqual",
					Type: model.ResourceProperty_STRUCT,
				},
				{
					Name: "in",
					Type: model.ResourceProperty_STRUCT,
				},
				{
					Name: "isNull",
					Type: model.ResourceProperty_STRUCT,
				},
				{
					Name: "regexMatch",
					Type: model.ResourceProperty_STRUCT,
				},
			},

			Annotations: map[string]string{
				"EnableAudit":  "true",
				"OpenApiGroup": "meta",
			},
		},
		{
			Name: "PairExpression",
			Properties: []*model.ResourceProperty{
				{
					Name: "left",
					Type: model.ResourceProperty_STRUCT,
				},
				{
					Name: "right",
					Type: model.ResourceProperty_STRUCT,
				},
			},

			Annotations: map[string]string{
				"OpenApiGroup": "meta",
				"EnableAudit":  "true",
			},
		},
		{
			Name: "RegexMatchExpression",
			Properties: []*model.ResourceProperty{
				{
					Name: "pattern",
					Type: model.ResourceProperty_STRING,
				},
				{
					Name: "expression",
					Type: model.ResourceProperty_STRUCT,
				},
			},

			Annotations: map[string]string{
				"OpenApiGroup": "meta",
				"EnableAudit":  "true",
			},
		},
		{
			Name: "Expression",
			Properties: []*model.ResourceProperty{
				{
					Name: "property",
					Type: model.ResourceProperty_STRING,
				},
				{
					Name: "value",
					Type: model.ResourceProperty_OBJECT,
				},
			},

			Annotations: map[string]string{
				"EnableAudit":  "true",
				"OpenApiGroup": "meta",
			},
		},
	},
	Properties: []*model.ResourceProperty{
		{
			Name:         "id",
			Type:         model.ResourceProperty_UUID,
			Required:     true,
			Immutable:    true,
			ExampleValue: structpb.NewStringValue("a39621a4-6d48-11ee-b962-0242ac120002"),

			Annotations: map[string]string{
				"PrimaryProperty": "true",
				"SpecialProperty": "true",
			},
		},
		{
			Name:         "version",
			Type:         model.ResourceProperty_INT32,
			Required:     true,
			DefaultValue: structpb.NewNumberValue(1),
			ExampleValue: structpb.NewNumberValue(1),

			Annotations: map[string]string{
				"SpecialProperty":     "true",
				"AllowEmptyPrimitive": "true",
			},
		},
		{
			Name:         "auditData",
			Type:         model.ResourceProperty_STRUCT,
			ExampleValue: structpb.NewStructValue(&structpb.Struct{Fields: map[string]*structpb.Value{"createdOn": structpb.NewStringValue("2024-01-03T15:02:45+04:00"), "updatedOn": structpb.NewStringValue("2024-01-03T15:02:45+04:00"), "createdBy": structpb.NewStringValue("admin"), "updatedBy": structpb.NewStringValue("admin")}}),

			Annotations: map[string]string{
				"SpecialProperty": "true",
			},
		},
		{
			Name:         "namespace",
			Type:         model.ResourceProperty_STRING,
			Length:       255,
			ExampleValue: structpb.NewStringValue("default"),
		},
		{
			Name:         "resource",
			Type:         model.ResourceProperty_STRING,
			Length:       255,
			ExampleValue: structpb.NewStringValue("Book"),
		},
		{
			Name: "recordSelector",
			Type: model.ResourceProperty_STRUCT,
		},
		{
			Name:         "operation",
			Type:         model.ResourceProperty_ENUM,
			Length:       255,
			Required:     true,
			DefaultValue: structpb.NewStringValue("FULL"),
			ExampleValue: structpb.NewStringValue("READ"),
		},
		{
			Name: "before",
			Type: model.ResourceProperty_TIMESTAMP,
		},
		{
			Name: "after",
			Type: model.ResourceProperty_TIMESTAMP,
		},
		{
			Name: "user",
			Type: model.ResourceProperty_REFERENCE,
		},
		{
			Name: "role",
			Type: model.ResourceProperty_REFERENCE,
		},
		{
			Name:     "permit",
			Type:     model.ResourceProperty_ENUM,
			Length:   255,
			Required: true,
		},
		{
			Name: "localFlags",
			Type: model.ResourceProperty_OBJECT,
		},
	},

	Annotations: map[string]string{
		"EnableAudit":  "true",
		"OpenApiGroup": "meta",
	},
}
View Source
var PropertyMapperInstance = NewPropertyMapper()
View Source
var RecordMapperInstance = NewRecordMapper()
View Source
var RecordResource = &model.Resource{
	Name:        "Record",
	Namespace:   "system",
	Title:       util.Pointer("Generic Record"),
	Description: util.Pointer("A generic record resource. All Apis are extended from Generic Record resource"),
	Properties: []*model.ResourceProperty{
		{
			Name:         "id",
			Type:         model.ResourceProperty_UUID,
			Required:     true,
			Immutable:    true,
			ExampleValue: structpb.NewStringValue("a39621a4-6d48-11ee-b962-0242ac120002"),

			Annotations: map[string]string{
				"SpecialProperty": "true",
				"PrimaryProperty": "true",
			},
		},
		{
			Name:     "properties",
			Type:     model.ResourceProperty_OBJECT,
			Required: true,
		},
		{
			Name: "packedProperties",
			Type: model.ResourceProperty_LIST,

			Annotations: map[string]string{
				"OpenApiHide": "true",
			},
		},
	},
	Virtual: true,

	Annotations: map[string]string{
		"RestApiDisabled": "true",
	},
}
View Source
var RecordSearchParamsMapperInstance = NewRecordSearchParamsMapper()
View Source
var RegexMatchExpressionMapperInstance = NewRegexMatchExpressionMapper()
View Source
var ResourceActionAuditDataMapperInstance = NewResourceActionAuditDataMapper()
View Source
var ResourceActionMapperInstance = NewResourceActionMapper()
View Source
var ResourceActionResource = &model.Resource{
	Name:      "ResourceAction",
	Namespace: "system",
	Types: []*model.ResourceSubType{
		{
			Name:        "SubType",
			Title:       "Sub Type",
			Description: "Sub Type is a type that represents a sub type of a resource. It is mostly used by STRUCT type to define the properties of the struct. ",
			Properties: []*model.ResourceProperty{
				{
					Name:         "name",
					Type:         model.ResourceProperty_STRING,
					Required:     true,
					ExampleValue: structpb.NewStringValue("Book"),
				},
				{
					Name:         "title",
					Type:         model.ResourceProperty_STRING,
					Length:       256,
					ExampleValue: structpb.NewStringValue("Book"),
				},
				{
					Name:         "description",
					Type:         model.ResourceProperty_STRING,
					Length:       256,
					ExampleValue: structpb.NewStringValue("Book is a sub type of Resource. It represents a book in the system. "),
				},
				{
					Name:         "properties",
					Type:         model.ResourceProperty_MAP,
					Required:     true,
					ExampleValue: structpb.NewListValue(&structpb.ListValue{Values: []*structpb.Value{structpb.NewStructValue(&structpb.Struct{Fields: map[string]*structpb.Value{"name": structpb.NewStringValue("title"), "type": structpb.NewStringValue("STRING")}})}}),
				},
			},

			Annotations: map[string]string{
				"EnableAudit":     "true",
				"RestApiDisabled": "true",
				"OpenApiGroup":    "meta",
			},
		},
		{
			Name:        "Property",
			Title:       "Property",
			Description: "Property is a type that represents a property of a resource. It is like an API properties or properties of class in a programming language",
			Properties: []*model.ResourceProperty{
				{
					Name:         "type",
					Type:         model.ResourceProperty_ENUM,
					Required:     true,
					ExampleValue: structpb.NewStringValue("STRING"),
				},
				{
					Name:         "typeRef",
					Type:         model.ResourceProperty_STRING,
					Length:       256,
					ExampleValue: structpb.NewStringValue("BookPublishingDetails"),
				},
				{
					Name:         "primary",
					Type:         model.ResourceProperty_BOOL,
					Required:     true,
					DefaultValue: nil,
				},
				{
					Name:         "required",
					Type:         model.ResourceProperty_BOOL,
					Required:     true,
					DefaultValue: nil,
				},
				{
					Name:         "unique",
					Type:         model.ResourceProperty_BOOL,
					Required:     true,
					DefaultValue: nil,
				},
				{
					Name:         "immutable",
					Type:         model.ResourceProperty_BOOL,
					Required:     true,
					DefaultValue: nil,
				},
				{
					Name:         "length",
					Type:         model.ResourceProperty_INT32,
					Required:     true,
					DefaultValue: structpb.NewNumberValue(256),
					ExampleValue: structpb.NewNumberValue(256),
				},
				{
					Name:         "item",
					Type:         model.ResourceProperty_STRUCT,
					ExampleValue: structpb.NewStructValue(&structpb.Struct{Fields: map[string]*structpb.Value{"type": structpb.NewStringValue("STRING")}}),
				},
				{
					Name:         "reference",
					Type:         model.ResourceProperty_STRING,
					ExampleValue: structpb.NewStringValue("Book"),
				},
				{
					Name:         "backReference",
					Type:         model.ResourceProperty_STRING,
					ExampleValue: structpb.NewStringValue("Book"),
				},
				{
					Name:         "defaultValue",
					Type:         model.ResourceProperty_OBJECT,
					ExampleValue: structpb.NewStringValue("Lord of the Rings"),
				},
				{
					Name:         "enumValues",
					Type:         model.ResourceProperty_LIST,
					ExampleValue: structpb.NewListValue(&structpb.ListValue{Values: []*structpb.Value{structpb.NewStringValue("UNKNOWN"), structpb.NewStringValue("ASC"), structpb.NewStringValue("DESC")}}),
				},
				{
					Name:         "exampleValue",
					Type:         model.ResourceProperty_OBJECT,
					ExampleValue: structpb.NewStringValue("no-book-name"),
				},
				{
					Name:         "title",
					Type:         model.ResourceProperty_STRING,
					Length:       256,
					ExampleValue: structpb.NewStringValue("Book Title"),
				},
				{
					Name:         "description",
					Type:         model.ResourceProperty_STRING,
					Length:       256,
					ExampleValue: structpb.NewStringValue("Book Title is a property of Book Resource. It represents the title of the book."),
				},
				{
					Name:         "annotations",
					Type:         model.ResourceProperty_MAP,
					ExampleValue: structpb.NewStructValue(&structpb.Struct{Fields: map[string]*structpb.Value{"CheckVersion": structpb.NewStringValue("true"), "IgnoreIfExists": structpb.NewStringValue("true"), "CommonType": structpb.NewStringValue("testType")}}),

					Annotations: map[string]string{
						"SpecialProperty": "true",
					},
				},
			},

			Annotations: map[string]string{
				"EnableAudit":     "true",
				"RestApiDisabled": "true",
				"OpenApiGroup":    "meta",
			},
		},
		{
			Name:        "AuditData",
			Title:       "Audit Data",
			Description: "Audit Data is a type that represents the audit data of a resource/record. ",
			Properties: []*model.ResourceProperty{
				{
					Name:         "createdBy",
					Type:         model.ResourceProperty_STRING,
					Length:       256,
					Immutable:    true,
					ExampleValue: structpb.NewStringValue("admin"),

					Annotations: map[string]string{
						"SpecialProperty": "true",
					},
				},
				{
					Name:         "updatedBy",
					Type:         model.ResourceProperty_STRING,
					Length:       256,
					ExampleValue: structpb.NewStringValue("admin"),

					Annotations: map[string]string{
						"SpecialProperty": "true",
					},
				},
				{
					Name:         "createdOn",
					Type:         model.ResourceProperty_TIMESTAMP,
					Immutable:    true,
					ExampleValue: structpb.NewStringValue("2024-01-03T15:02:45+04:00"),

					Annotations: map[string]string{
						"SpecialProperty": "true",
					},
				},
				{
					Name:         "updatedOn",
					Type:         model.ResourceProperty_TIMESTAMP,
					ExampleValue: structpb.NewStringValue("2024-01-03T15:02:45+04:00"),

					Annotations: map[string]string{
						"SpecialProperty": "true",
					},
				},
			},

			Annotations: map[string]string{
				"RestApiDisabled": "true",
				"OpenApiGroup":    "meta",
				"EnableAudit":     "true",
			},
		},
	},
	Properties: []*model.ResourceProperty{
		{
			Name:         "id",
			Type:         model.ResourceProperty_UUID,
			Required:     true,
			Immutable:    true,
			ExampleValue: structpb.NewStringValue("a39621a4-6d48-11ee-b962-0242ac120002"),

			Annotations: map[string]string{
				"SpecialProperty": "true",
				"PrimaryProperty": "true",
			},
		},
		{
			Name:         "version",
			Type:         model.ResourceProperty_INT32,
			Required:     true,
			DefaultValue: structpb.NewNumberValue(1),
			ExampleValue: structpb.NewNumberValue(1),

			Annotations: map[string]string{
				"AllowEmptyPrimitive": "true",
				"SpecialProperty":     "true",
			},
		},
		{
			Name:         "auditData",
			Type:         model.ResourceProperty_STRUCT,
			ExampleValue: structpb.NewStructValue(&structpb.Struct{Fields: map[string]*structpb.Value{"createdBy": structpb.NewStringValue("admin"), "updatedBy": structpb.NewStringValue("admin"), "createdOn": structpb.NewStringValue("2024-01-03T15:02:45+04:00"), "updatedOn": structpb.NewStringValue("2024-01-03T15:02:45+04:00")}}),

			Annotations: map[string]string{
				"SpecialProperty": "true",
			},
		},
		{
			Name:     "resource",
			Type:     model.ResourceProperty_REFERENCE,
			Required: true,
		},
		{
			Name:     "name",
			Type:     model.ResourceProperty_STRING,
			Length:   256,
			Required: true,

			Annotations: map[string]string{
				"IsHclLabel": "true",
			},
		},
		{
			Name:   "title",
			Type:   model.ResourceProperty_STRING,
			Length: 256,

			Annotations: map[string]string{
				"IsHclLabel": "true",
			},
		},
		{
			Name:   "description",
			Type:   model.ResourceProperty_STRING,
			Length: 256,

			Annotations: map[string]string{
				"IsHclLabel": "true",
			},
		},
		{
			Name:         "internal",
			Type:         model.ResourceProperty_BOOL,
			Required:     true,
			DefaultValue: nil,

			Annotations: map[string]string{
				"IsHclLabel": "true",
			},
		},
		{
			Name: "types",
			Type: model.ResourceProperty_LIST,
		},
		{
			Name: "input",
			Type: model.ResourceProperty_MAP,
		},
		{
			Name: "output",
			Type: model.ResourceProperty_STRUCT,
		},
		{
			Name:         "annotations",
			Type:         model.ResourceProperty_MAP,
			ExampleValue: structpb.NewStructValue(&structpb.Struct{Fields: map[string]*structpb.Value{"CheckVersion": structpb.NewStringValue("true"), "IgnoreIfExists": structpb.NewStringValue("true"), "CommonType": structpb.NewStringValue("testType")}}),

			Annotations: map[string]string{
				"SpecialProperty": "true",
			},
		},
	},
	Indexes: []*model.ResourceIndex{
		{
			Properties: []*model.ResourceIndexProperty{
				{
					Name:  "resource",
					Order: model.Order_ORDER_UNKNOWN,
				},
				{
					Name:  "name",
					Order: model.Order_ORDER_UNKNOWN,
				},
			},
			IndexType: model.ResourceIndexType_BTREE,
			Unique:    true,
		},
	},

	Annotations: map[string]string{
		"EnableAudit":     "true",
		"RestApiDisabled": "true",
		"OpenApiGroup":    "meta",
	},
}
View Source
var ResourceAuditDataMapperInstance = NewResourceAuditDataMapper()
View Source
var ResourceIndexMapperInstance = NewResourceIndexMapper()
View Source
var ResourceIndexPropertyMapperInstance = NewResourceIndexPropertyMapper()
View Source
var ResourceMapperInstance = NewResourceMapper()
View Source
var ResourceResource = &model.Resource{
	Name:        "Resource",
	Namespace:   "system",
	Title:       util.Pointer("Resource"),
	Description: util.Pointer("Resource is a top level resource that represents a model and API in the system"),
	Types: []*model.ResourceSubType{
		{
			Name:        "Property",
			Title:       "Property",
			Description: "Property is a type that represents a property of a resource. It is like an API properties or properties of class in a programming language",
			Properties: []*model.ResourceProperty{
				{
					Name:         "type",
					Type:         model.ResourceProperty_ENUM,
					Required:     true,
					ExampleValue: structpb.NewStringValue("STRING"),
				},
				{
					Name:         "typeRef",
					Type:         model.ResourceProperty_STRING,
					Length:       256,
					ExampleValue: structpb.NewStringValue("BookPublishingDetails"),
				},
				{
					Name:         "primary",
					Type:         model.ResourceProperty_BOOL,
					Required:     true,
					DefaultValue: nil,
				},
				{
					Name:         "required",
					Type:         model.ResourceProperty_BOOL,
					Required:     true,
					DefaultValue: nil,
				},
				{
					Name:         "unique",
					Type:         model.ResourceProperty_BOOL,
					Required:     true,
					DefaultValue: nil,
				},
				{
					Name:         "immutable",
					Type:         model.ResourceProperty_BOOL,
					Required:     true,
					DefaultValue: nil,
				},
				{
					Name:         "length",
					Type:         model.ResourceProperty_INT32,
					Required:     true,
					DefaultValue: structpb.NewNumberValue(256),
					ExampleValue: structpb.NewNumberValue(256),
				},
				{
					Name:         "item",
					Type:         model.ResourceProperty_STRUCT,
					ExampleValue: structpb.NewStructValue(&structpb.Struct{Fields: map[string]*structpb.Value{"type": structpb.NewStringValue("STRING")}}),
				},
				{
					Name:         "reference",
					Type:         model.ResourceProperty_STRING,
					ExampleValue: structpb.NewStringValue("Book"),
				},
				{
					Name:         "backReference",
					Type:         model.ResourceProperty_STRING,
					ExampleValue: structpb.NewStringValue("Book"),
				},
				{
					Name:         "defaultValue",
					Type:         model.ResourceProperty_OBJECT,
					ExampleValue: structpb.NewStringValue("Lord of the Rings"),
				},
				{
					Name:         "enumValues",
					Type:         model.ResourceProperty_LIST,
					ExampleValue: structpb.NewListValue(&structpb.ListValue{Values: []*structpb.Value{structpb.NewStringValue("UNKNOWN"), structpb.NewStringValue("ASC"), structpb.NewStringValue("DESC")}}),
				},
				{
					Name:         "exampleValue",
					Type:         model.ResourceProperty_OBJECT,
					ExampleValue: structpb.NewStringValue("no-book-name"),
				},
				{
					Name:         "title",
					Type:         model.ResourceProperty_STRING,
					Length:       256,
					ExampleValue: structpb.NewStringValue("Book Title"),
				},
				{
					Name:         "description",
					Type:         model.ResourceProperty_STRING,
					Length:       256,
					ExampleValue: structpb.NewStringValue("Book Title is a property of Book Resource. It represents the title of the book."),
				},
				{
					Name:         "annotations",
					Type:         model.ResourceProperty_MAP,
					ExampleValue: structpb.NewStructValue(&structpb.Struct{Fields: map[string]*structpb.Value{"CheckVersion": structpb.NewStringValue("true"), "IgnoreIfExists": structpb.NewStringValue("true"), "CommonType": structpb.NewStringValue("testType")}}),

					Annotations: map[string]string{
						"SpecialProperty": "true",
					},
				},
			},

			Annotations: map[string]string{
				"OpenApiRestPath": "resources",
				"EnableAudit":     "true",
				"RestApiDisabled": "true",
				"OpenApiGroup":    "meta",
			},
		},
		{
			Name:        "SubType",
			Title:       "Sub Type",
			Description: "Sub Type is a type that represents a sub type of a resource. It is mostly used by STRUCT type to define the properties of the struct. ",
			Properties: []*model.ResourceProperty{
				{
					Name:         "name",
					Type:         model.ResourceProperty_STRING,
					Required:     true,
					ExampleValue: structpb.NewStringValue("Book"),
				},
				{
					Name:         "title",
					Type:         model.ResourceProperty_STRING,
					Length:       256,
					ExampleValue: structpb.NewStringValue("Book"),
				},
				{
					Name:         "description",
					Type:         model.ResourceProperty_STRING,
					Length:       256,
					ExampleValue: structpb.NewStringValue("Book is a sub type of Resource. It represents a book in the system. "),
				},
				{
					Name:         "properties",
					Type:         model.ResourceProperty_MAP,
					Required:     true,
					ExampleValue: structpb.NewListValue(&structpb.ListValue{Values: []*structpb.Value{structpb.NewStructValue(&structpb.Struct{Fields: map[string]*structpb.Value{"name": structpb.NewStringValue("title"), "type": structpb.NewStringValue("STRING")}})}}),
				},
			},

			Annotations: map[string]string{
				"OpenApiRestPath": "resources",
				"EnableAudit":     "true",
				"RestApiDisabled": "true",
				"OpenApiGroup":    "meta",
			},
		},
		{
			Name:        "AuditData",
			Title:       "Audit Data",
			Description: "Audit Data is a type that represents the audit data of a resource/record. ",
			Properties: []*model.ResourceProperty{
				{
					Name:         "createdBy",
					Type:         model.ResourceProperty_STRING,
					Length:       256,
					Immutable:    true,
					ExampleValue: structpb.NewStringValue("admin"),

					Annotations: map[string]string{
						"SpecialProperty": "true",
					},
				},
				{
					Name:         "updatedBy",
					Type:         model.ResourceProperty_STRING,
					Length:       256,
					ExampleValue: structpb.NewStringValue("admin"),

					Annotations: map[string]string{
						"SpecialProperty": "true",
					},
				},
				{
					Name:         "createdOn",
					Type:         model.ResourceProperty_TIMESTAMP,
					Immutable:    true,
					ExampleValue: structpb.NewStringValue("2024-01-03T15:02:45+04:00"),

					Annotations: map[string]string{
						"SpecialProperty": "true",
					},
				},
				{
					Name:         "updatedOn",
					Type:         model.ResourceProperty_TIMESTAMP,
					ExampleValue: structpb.NewStringValue("2024-01-03T15:02:45+04:00"),

					Annotations: map[string]string{
						"SpecialProperty": "true",
					},
				},
			},

			Annotations: map[string]string{
				"EnableAudit":     "true",
				"RestApiDisabled": "true",
				"OpenApiGroup":    "meta",
				"OpenApiRestPath": "resources",
			},
		},
		{
			Name: "IndexProperty",
			Properties: []*model.ResourceProperty{
				{
					Name:     "name",
					Type:     model.ResourceProperty_STRING,
					Required: true,
				},
				{
					Name:         "order",
					Type:         model.ResourceProperty_ENUM,
					DefaultValue: structpb.NewStringValue("ASC"),
				},
			},

			Annotations: map[string]string{
				"EnableAudit":     "true",
				"RestApiDisabled": "true",
				"OpenApiGroup":    "meta",
				"OpenApiRestPath": "resources",
			},
		},
		{
			Name: "Index",
			Properties: []*model.ResourceProperty{
				{
					Name: "properties",
					Type: model.ResourceProperty_LIST,
				},
				{
					Name:         "indexType",
					Type:         model.ResourceProperty_ENUM,
					DefaultValue: structpb.NewStringValue("BTREE"),
				},
				{
					Name: "unique",
					Type: model.ResourceProperty_BOOL,
				},
				{
					Name:         "annotations",
					Type:         model.ResourceProperty_MAP,
					ExampleValue: structpb.NewStructValue(&structpb.Struct{Fields: map[string]*structpb.Value{"CheckVersion": structpb.NewStringValue("true"), "IgnoreIfExists": structpb.NewStringValue("true"), "CommonType": structpb.NewStringValue("testType")}}),

					Annotations: map[string]string{
						"SpecialProperty": "true",
					},
				},
			},

			Annotations: map[string]string{
				"EnableAudit":     "true",
				"RestApiDisabled": "true",
				"OpenApiGroup":    "meta",
				"OpenApiRestPath": "resources",
			},
		},
	},
	Properties: []*model.ResourceProperty{
		{
			Name:         "id",
			Type:         model.ResourceProperty_UUID,
			Required:     true,
			Immutable:    true,
			ExampleValue: structpb.NewStringValue("a39621a4-6d48-11ee-b962-0242ac120002"),

			Annotations: map[string]string{
				"SpecialProperty": "true",
				"PrimaryProperty": "true",
			},
		},
		{
			Name:         "version",
			Type:         model.ResourceProperty_INT32,
			Required:     true,
			DefaultValue: structpb.NewNumberValue(1),
			ExampleValue: structpb.NewNumberValue(1),

			Annotations: map[string]string{
				"SpecialProperty":     "true",
				"AllowEmptyPrimitive": "true",
			},
		},
		{
			Name:         "auditData",
			Type:         model.ResourceProperty_STRUCT,
			ExampleValue: structpb.NewStructValue(&structpb.Struct{Fields: map[string]*structpb.Value{"createdBy": structpb.NewStringValue("admin"), "updatedBy": structpb.NewStringValue("admin"), "createdOn": structpb.NewStringValue("2024-01-03T15:02:45+04:00"), "updatedOn": structpb.NewStringValue("2024-01-03T15:02:45+04:00")}}),

			Annotations: map[string]string{
				"SpecialProperty": "true",
			},
		},
		{
			Name:         "name",
			Type:         model.ResourceProperty_STRING,
			Length:       256,
			Required:     true,
			ExampleValue: structpb.NewStringValue("Book"),

			Annotations: map[string]string{
				"IsHclLabel": "true",
			},
		},
		{
			Name:         "namespace",
			Type:         model.ResourceProperty_REFERENCE,
			Required:     true,
			ExampleValue: structpb.NewStructValue(&structpb.Struct{Fields: map[string]*structpb.Value{"name": structpb.NewStringValue("system")}}),
		},
		{
			Name:         "virtual",
			Type:         model.ResourceProperty_BOOL,
			Required:     true,
			DefaultValue: nil,
		},
		{
			Name:         "properties",
			Type:         model.ResourceProperty_MAP,
			Required:     true,
			ExampleValue: structpb.NewListValue(&structpb.ListValue{Values: []*structpb.Value{structpb.NewStructValue(&structpb.Struct{Fields: map[string]*structpb.Value{"name": structpb.NewStringValue("title"), "type": structpb.NewStringValue("name")}}), structpb.NewStructValue(&structpb.Struct{Fields: map[string]*structpb.Value{"name": structpb.NewStringValue("type"), "type": structpb.NewStringValue("STRING")}})}}),
		},
		{
			Name: "indexes",
			Type: model.ResourceProperty_LIST,
		},
		{
			Name: "types",
			Type: model.ResourceProperty_LIST,
		},
		{
			Name:         "immutable",
			Type:         model.ResourceProperty_BOOL,
			Required:     true,
			DefaultValue: nil,
		},
		{
			Name:         "abstract",
			Type:         model.ResourceProperty_BOOL,
			Required:     true,
			DefaultValue: nil,
		},
		{
			Name:         "checkReferences",
			Type:         model.ResourceProperty_BOOL,
			Required:     true,
			DefaultValue: nil,
		},
		{
			Name: "dataSource",
			Type: model.ResourceProperty_REFERENCE,
		},
		{
			Name:         "entity",
			Type:         model.ResourceProperty_STRING,
			Length:       256,
			ExampleValue: structpb.NewStringValue("book"),
		},
		{
			Name:         "catalog",
			Type:         model.ResourceProperty_STRING,
			Length:       256,
			ExampleValue: structpb.NewStringValue("public"),
		},
		{
			Name:         "title",
			Type:         model.ResourceProperty_STRING,
			Length:       256,
			ExampleValue: structpb.NewStringValue("Book"),
		},
		{
			Name:         "description",
			Type:         model.ResourceProperty_STRING,
			Length:       256,
			ExampleValue: structpb.NewStringValue("Book is a resource in the system. It represents a book in the system."),
		},
		{
			Name:         "annotations",
			Type:         model.ResourceProperty_MAP,
			ExampleValue: structpb.NewStructValue(&structpb.Struct{Fields: map[string]*structpb.Value{"CheckVersion": structpb.NewStringValue("true"), "IgnoreIfExists": structpb.NewStringValue("true"), "CommonType": structpb.NewStringValue("testType")}}),

			Annotations: map[string]string{
				"SpecialProperty": "true",
			},
		},
	},
	Indexes: []*model.ResourceIndex{
		{
			Properties: []*model.ResourceIndexProperty{
				{
					Name:  "namespace",
					Order: model.Order_ORDER_UNKNOWN,
				},
				{
					Name:  "name",
					Order: model.Order_ORDER_UNKNOWN,
				},
			},
			IndexType: model.ResourceIndexType_BTREE,
			Unique:    true,
		},
	},

	Annotations: map[string]string{
		"OpenApiRestPath": "resources",
		"EnableAudit":     "true",
		"RestApiDisabled": "true",
		"OpenApiGroup":    "meta",
	},
}
View Source
var RoleAuditDataMapperInstance = NewRoleAuditDataMapper()
View Source
var RoleMapperInstance = NewRoleMapper()
View Source
var RoleResource = &model.Resource{
	Name:        "Role",
	Namespace:   "system",
	Title:       util.Pointer("Role"),
	Description: util.Pointer("Role is a resource that defines the access control model. It is used to give permissions to users in a grouped way"),
	Types: []*model.ResourceSubType{
		{
			Name:        "AuditData",
			Title:       "Audit Data",
			Description: "Audit Data is a type that represents the audit data of a resource/record. ",
			Properties: []*model.ResourceProperty{
				{
					Name:         "createdBy",
					Type:         model.ResourceProperty_STRING,
					Length:       256,
					Immutable:    true,
					ExampleValue: structpb.NewStringValue("admin"),

					Annotations: map[string]string{
						"SpecialProperty": "true",
					},
				},
				{
					Name:         "updatedBy",
					Type:         model.ResourceProperty_STRING,
					Length:       256,
					ExampleValue: structpb.NewStringValue("admin"),

					Annotations: map[string]string{
						"SpecialProperty": "true",
					},
				},
				{
					Name:         "createdOn",
					Type:         model.ResourceProperty_TIMESTAMP,
					Immutable:    true,
					ExampleValue: structpb.NewStringValue("2024-01-03T15:02:45+04:00"),

					Annotations: map[string]string{
						"SpecialProperty": "true",
					},
				},
				{
					Name:         "updatedOn",
					Type:         model.ResourceProperty_TIMESTAMP,
					ExampleValue: structpb.NewStringValue("2024-01-03T15:02:45+04:00"),

					Annotations: map[string]string{
						"SpecialProperty": "true",
					},
				},
			},

			Annotations: map[string]string{
				"EnableAudit":  "true",
				"OpenApiGroup": "meta",
			},
		},
	},
	Properties: []*model.ResourceProperty{
		{
			Name:         "id",
			Type:         model.ResourceProperty_UUID,
			Required:     true,
			Immutable:    true,
			ExampleValue: structpb.NewStringValue("a39621a4-6d48-11ee-b962-0242ac120002"),

			Annotations: map[string]string{
				"SpecialProperty": "true",
				"PrimaryProperty": "true",
			},
		},
		{
			Name:         "version",
			Type:         model.ResourceProperty_INT32,
			Required:     true,
			DefaultValue: structpb.NewNumberValue(1),
			ExampleValue: structpb.NewNumberValue(1),

			Annotations: map[string]string{
				"SpecialProperty":     "true",
				"AllowEmptyPrimitive": "true",
			},
		},
		{
			Name:         "auditData",
			Type:         model.ResourceProperty_STRUCT,
			ExampleValue: structpb.NewStructValue(&structpb.Struct{Fields: map[string]*structpb.Value{"createdBy": structpb.NewStringValue("admin"), "updatedBy": structpb.NewStringValue("admin"), "createdOn": structpb.NewStringValue("2024-01-03T15:02:45+04:00"), "updatedOn": structpb.NewStringValue("2024-01-03T15:02:45+04:00")}}),

			Annotations: map[string]string{
				"SpecialProperty": "true",
			},
		},
		{
			Name:     "name",
			Type:     model.ResourceProperty_STRING,
			Length:   256,
			Required: true,
			Unique:   true,

			Annotations: map[string]string{
				"IsHclLabel": "true",
			},
		},
		{
			Name: "permissions",
			Type: model.ResourceProperty_LIST,
		},
		{
			Name: "details",
			Type: model.ResourceProperty_OBJECT,
		},
	},

	Annotations: map[string]string{
		"EnableAudit":  "true",
		"OpenApiGroup": "meta",
	},
}
View Source
var SubTypeMapperInstance = NewSubTypeMapper()
View Source
var UserAuditDataMapperInstance = NewUserAuditDataMapper()
View Source
var UserMapperInstance = NewUserMapper()
View Source
var UserResource = &model.Resource{
	Name:        "User",
	Namespace:   "system",
	Title:       util.Pointer("User"),
	Description: util.Pointer("User is a resource that defines the access control model. It is used to authenticate and authorize users."),
	Types: []*model.ResourceSubType{
		{
			Name:        "AuditData",
			Title:       "Audit Data",
			Description: "Audit Data is a type that represents the audit data of a resource/record. ",
			Properties: []*model.ResourceProperty{
				{
					Name:         "createdBy",
					Type:         model.ResourceProperty_STRING,
					Length:       256,
					Immutable:    true,
					ExampleValue: structpb.NewStringValue("admin"),

					Annotations: map[string]string{
						"SpecialProperty": "true",
					},
				},
				{
					Name:         "updatedBy",
					Type:         model.ResourceProperty_STRING,
					Length:       256,
					ExampleValue: structpb.NewStringValue("admin"),

					Annotations: map[string]string{
						"SpecialProperty": "true",
					},
				},
				{
					Name:         "createdOn",
					Type:         model.ResourceProperty_TIMESTAMP,
					Immutable:    true,
					ExampleValue: structpb.NewStringValue("2024-01-03T15:02:45+04:00"),

					Annotations: map[string]string{
						"SpecialProperty": "true",
					},
				},
				{
					Name:         "updatedOn",
					Type:         model.ResourceProperty_TIMESTAMP,
					ExampleValue: structpb.NewStringValue("2024-01-03T15:02:45+04:00"),

					Annotations: map[string]string{
						"SpecialProperty": "true",
					},
				},
			},

			Annotations: map[string]string{
				"EnableAudit":  "true",
				"OpenApiGroup": "meta",
			},
		},
	},
	Properties: []*model.ResourceProperty{
		{
			Name:         "id",
			Type:         model.ResourceProperty_UUID,
			Required:     true,
			Immutable:    true,
			ExampleValue: structpb.NewStringValue("a39621a4-6d48-11ee-b962-0242ac120002"),

			Annotations: map[string]string{
				"SpecialProperty": "true",
				"PrimaryProperty": "true",
			},
		},
		{
			Name:         "version",
			Type:         model.ResourceProperty_INT32,
			Required:     true,
			DefaultValue: structpb.NewNumberValue(1),
			ExampleValue: structpb.NewNumberValue(1),

			Annotations: map[string]string{
				"SpecialProperty":     "true",
				"AllowEmptyPrimitive": "true",
			},
		},
		{
			Name:         "auditData",
			Type:         model.ResourceProperty_STRUCT,
			ExampleValue: structpb.NewStructValue(&structpb.Struct{Fields: map[string]*structpb.Value{"createdBy": structpb.NewStringValue("admin"), "updatedBy": structpb.NewStringValue("admin"), "createdOn": structpb.NewStringValue("2024-01-03T15:02:45+04:00"), "updatedOn": structpb.NewStringValue("2024-01-03T15:02:45+04:00")}}),

			Annotations: map[string]string{
				"SpecialProperty": "true",
			},
		},
		{
			Name:     "username",
			Type:     model.ResourceProperty_STRING,
			Length:   256,
			Required: true,
			Unique:   true,

			Annotations: map[string]string{
				"IsHclLabel": "true",
			},
		},
		{
			Name:   "password",
			Type:   model.ResourceProperty_STRING,
			Length: 256,
		},
		{
			Name: "roles",
			Type: model.ResourceProperty_LIST,
		},
		{
			Name: "permissions",
			Type: model.ResourceProperty_LIST,
		},
		{
			Name: "details",
			Type: model.ResourceProperty_OBJECT,
		},
	},

	Annotations: map[string]string{
		"EnableAudit":  "true",
		"OpenApiGroup": "meta",
	},
}

Functions

This section is empty.

Types

type AuditLog added in v1.1.90

type AuditLog struct {
	Id          *uuid.UUID        `json:"id,omitempty"`
	Version     int32             `json:"version,omitempty"`
	Namespace   string            `json:"namespace,omitempty"`
	Resource    string            `json:"resource,omitempty"`
	RecordId    string            `json:"recordId,omitempty"`
	Time        time.Time         `json:"time,omitempty"`
	Username    string            `json:"username,omitempty"`
	Operation   AuditLogOperation `json:"operation,omitempty"`
	Properties  interface{}       `json:"properties,omitempty"`
	Annotations map[string]string `json:"annotations,omitempty"`
}

func (*AuditLog) GetAnnotations added in v1.1.90

func (s *AuditLog) GetAnnotations() map[string]string

func (*AuditLog) GetId added in v1.1.90

func (s *AuditLog) GetId() *uuid.UUID

func (*AuditLog) GetNamespace added in v1.1.90

func (s *AuditLog) GetNamespace() string

func (*AuditLog) GetOperation added in v1.1.90

func (s *AuditLog) GetOperation() AuditLogOperation

func (*AuditLog) GetProperties added in v1.2.21

func (s *AuditLog) GetProperties() interface{}

func (*AuditLog) GetRecordId added in v1.1.90

func (s *AuditLog) GetRecordId() string

func (*AuditLog) GetResource added in v1.1.90

func (s *AuditLog) GetResource() string

func (*AuditLog) GetTime added in v1.1.90

func (s *AuditLog) GetTime() time.Time

func (*AuditLog) GetUsername added in v1.1.90

func (s *AuditLog) GetUsername() string

func (*AuditLog) GetVersion added in v1.1.90

func (s *AuditLog) GetVersion() int32

type AuditLogMapper added in v1.1.90

type AuditLogMapper struct {
}

func NewAuditLogMapper added in v1.1.90

func NewAuditLogMapper() *AuditLogMapper

func (*AuditLogMapper) FromProperties added in v1.1.90

func (m *AuditLogMapper) FromProperties(properties map[string]*structpb.Value) *AuditLog

func (*AuditLogMapper) FromRecord added in v1.1.90

func (m *AuditLogMapper) FromRecord(record *model.Record) *AuditLog

func (*AuditLogMapper) New added in v1.1.90

func (m *AuditLogMapper) New() *AuditLog

func (*AuditLogMapper) ResourceIdentity added in v1.1.90

func (m *AuditLogMapper) ResourceIdentity() abs.ResourceIdentity

func (*AuditLogMapper) ToProperties added in v1.1.90

func (m *AuditLogMapper) ToProperties(auditLog *AuditLog) map[string]*structpb.Value

func (*AuditLogMapper) ToRecord added in v1.1.90

func (m *AuditLogMapper) ToRecord(auditLog *AuditLog) *model.Record

type AuditLogOperation added in v1.1.90

type AuditLogOperation string
const (
	AuditLogOperation_CREATE AuditLogOperation = "CREATE"
	AuditLogOperation_UPDATE AuditLogOperation = "UPDATE"
	AuditLogOperation_DELETE AuditLogOperation = "DELETE"
)

type BooleanExpression added in v1.2.39

type BooleanExpression struct {
	And                []BooleanExpression   `json:"and,omitempty"`
	Or                 []BooleanExpression   `json:"or,omitempty"`
	Not                *BooleanExpression    `json:"not,omitempty"`
	Equal              *PairExpression       `json:"equal,omitempty"`
	LessThan           *PairExpression       `json:"lessThan,omitempty"`
	GreaterThan        *PairExpression       `json:"greaterThan,omitempty"`
	LessThanOrEqual    *PairExpression       `json:"lessThanOrEqual,omitempty"`
	GreaterThanOrEqual *PairExpression       `json:"greaterThanOrEqual,omitempty"`
	In                 *PairExpression       `json:"in,omitempty"`
	IsNull             *Expression           `json:"isNull,omitempty"`
	RegexMatch         *RegexMatchExpression `json:"regexMatch,omitempty"`
}

func (*BooleanExpression) GetAnd added in v1.2.39

func (s *BooleanExpression) GetAnd() []BooleanExpression

func (*BooleanExpression) GetEqual added in v1.2.39

func (s *BooleanExpression) GetEqual() *PairExpression

func (*BooleanExpression) GetGreaterThan added in v1.2.39

func (s *BooleanExpression) GetGreaterThan() *PairExpression

func (*BooleanExpression) GetGreaterThanOrEqual added in v1.2.39

func (s *BooleanExpression) GetGreaterThanOrEqual() *PairExpression

func (*BooleanExpression) GetIn added in v1.2.39

func (s *BooleanExpression) GetIn() *PairExpression

func (*BooleanExpression) GetIsNull added in v1.2.39

func (s *BooleanExpression) GetIsNull() *Expression

func (*BooleanExpression) GetLessThan added in v1.2.39

func (s *BooleanExpression) GetLessThan() *PairExpression

func (*BooleanExpression) GetLessThanOrEqual added in v1.2.39

func (s *BooleanExpression) GetLessThanOrEqual() *PairExpression

func (*BooleanExpression) GetNot added in v1.2.39

func (s *BooleanExpression) GetNot() *BooleanExpression

func (*BooleanExpression) GetOr added in v1.2.39

func (s *BooleanExpression) GetOr() []BooleanExpression

func (*BooleanExpression) GetRegexMatch added in v1.2.39

func (s *BooleanExpression) GetRegexMatch() *RegexMatchExpression

type BooleanExpressionMapper added in v1.2.39

type BooleanExpressionMapper struct {
}

func NewBooleanExpressionMapper added in v1.2.39

func NewBooleanExpressionMapper() *BooleanExpressionMapper

func (*BooleanExpressionMapper) FromProperties added in v1.2.39

func (m *BooleanExpressionMapper) FromProperties(properties map[string]*structpb.Value) *BooleanExpression

func (*BooleanExpressionMapper) New added in v1.2.39

func (*BooleanExpressionMapper) ResourceIdentity added in v1.2.39

func (m *BooleanExpressionMapper) ResourceIdentity() abs.ResourceIdentity

func (*BooleanExpressionMapper) ToProperties added in v1.2.39

func (m *BooleanExpressionMapper) ToProperties(booleanExpression *BooleanExpression) map[string]*structpb.Value

type ChannelCall added in v1.2.21

type ChannelCall struct {
	ChannelKey string `json:"channelKey,omitempty"`
}

func (*ChannelCall) GetChannelKey added in v1.2.21

func (s *ChannelCall) GetChannelKey() string

type ChannelCallMapper added in v1.2.21

type ChannelCallMapper struct {
}

func NewChannelCallMapper added in v1.2.21

func NewChannelCallMapper() *ChannelCallMapper

func (*ChannelCallMapper) FromProperties added in v1.2.21

func (m *ChannelCallMapper) FromProperties(properties map[string]*structpb.Value) *ChannelCall

func (*ChannelCallMapper) New added in v1.2.21

func (m *ChannelCallMapper) New() *ChannelCall

func (*ChannelCallMapper) ResourceIdentity added in v1.2.21

func (m *ChannelCallMapper) ResourceIdentity() abs.ResourceIdentity

func (*ChannelCallMapper) ToProperties added in v1.2.21

func (m *ChannelCallMapper) ToProperties(channelCall *ChannelCall) map[string]*structpb.Value

type DataSource

type DataSource struct {
	Id          *uuid.UUID           `json:"id,omitempty"`
	Version     int32                `json:"version,omitempty"`
	AuditData   *DataSourceAuditData `json:"auditData,omitempty"`
	Name        string               `json:"name,omitempty"`
	Description string               `json:"description,omitempty"`
	Backend     DataSourceBackend    `json:"backend,omitempty"`
	Options     map[string]string    `json:"options,omitempty"`
}

func (*DataSource) GetAuditData added in v1.2.36

func (s *DataSource) GetAuditData() *DataSourceAuditData

func (*DataSource) GetBackend

func (s *DataSource) GetBackend() DataSourceBackend

func (*DataSource) GetDescription

func (s *DataSource) GetDescription() string

func (*DataSource) GetId

func (s *DataSource) GetId() *uuid.UUID

func (*DataSource) GetName

func (s *DataSource) GetName() string

func (*DataSource) GetOptions

func (s *DataSource) GetOptions() map[string]string

func (*DataSource) GetVersion

func (s *DataSource) GetVersion() int32

type DataSourceAuditData added in v1.2.36

type DataSourceAuditData struct {
	CreatedBy *string    `json:"createdBy,omitempty"`
	UpdatedBy *string    `json:"updatedBy,omitempty"`
	CreatedOn *time.Time `json:"createdOn,omitempty"`
	UpdatedOn *time.Time `json:"updatedOn,omitempty"`
}

func (*DataSourceAuditData) GetCreatedBy added in v1.2.36

func (s *DataSourceAuditData) GetCreatedBy() *string

func (*DataSourceAuditData) GetCreatedOn added in v1.2.36

func (s *DataSourceAuditData) GetCreatedOn() *time.Time

func (*DataSourceAuditData) GetUpdatedBy added in v1.2.36

func (s *DataSourceAuditData) GetUpdatedBy() *string

func (*DataSourceAuditData) GetUpdatedOn added in v1.2.36

func (s *DataSourceAuditData) GetUpdatedOn() *time.Time

type DataSourceAuditDataMapper added in v1.2.36

type DataSourceAuditDataMapper struct {
}

func NewDataSourceAuditDataMapper added in v1.2.36

func NewDataSourceAuditDataMapper() *DataSourceAuditDataMapper

func (*DataSourceAuditDataMapper) FromProperties added in v1.2.36

func (m *DataSourceAuditDataMapper) FromProperties(properties map[string]*structpb.Value) *DataSourceAuditData

func (*DataSourceAuditDataMapper) New added in v1.2.36

func (*DataSourceAuditDataMapper) ResourceIdentity added in v1.2.36

func (m *DataSourceAuditDataMapper) ResourceIdentity() abs.ResourceIdentity

func (*DataSourceAuditDataMapper) ToProperties added in v1.2.36

func (m *DataSourceAuditDataMapper) ToProperties(dataSourceAuditData *DataSourceAuditData) map[string]*structpb.Value

type DataSourceBackend

type DataSourceBackend string
const (
	DataSourceBackend_POSTGRESQL DataSourceBackend = "POSTGRESQL"
	DataSourceBackend_MYSQL      DataSourceBackend = "MYSQL"
	DataSourceBackend_MONGODB    DataSourceBackend = "MONGODB"
	DataSourceBackend_REDIS      DataSourceBackend = "REDIS"
	DataSourceBackend_SQLITE     DataSourceBackend = "SQLITE"
)

type DataSourceMapper

type DataSourceMapper struct {
}

func NewDataSourceMapper

func NewDataSourceMapper() *DataSourceMapper

func (*DataSourceMapper) FromProperties

func (m *DataSourceMapper) FromProperties(properties map[string]*structpb.Value) *DataSource

func (*DataSourceMapper) FromRecord

func (m *DataSourceMapper) FromRecord(record *model.Record) *DataSource

func (*DataSourceMapper) New

func (m *DataSourceMapper) New() *DataSource

func (*DataSourceMapper) ResourceIdentity

func (m *DataSourceMapper) ResourceIdentity() abs.ResourceIdentity

func (*DataSourceMapper) ToProperties

func (m *DataSourceMapper) ToProperties(dataSource *DataSource) map[string]*structpb.Value

func (*DataSourceMapper) ToRecord

func (m *DataSourceMapper) ToRecord(dataSource *DataSource) *model.Record

type Error added in v1.2.21

type Error struct {
	Code    *ExtensionCode `json:"code,omitempty"`
	Message *string        `json:"message,omitempty"`
	Fields  []ErrorField   `json:"fields,omitempty"`
}

func (*Error) GetCode added in v1.2.21

func (s *Error) GetCode() *ExtensionCode

func (*Error) GetFields added in v1.2.21

func (s *Error) GetFields() []ErrorField

func (*Error) GetMessage added in v1.2.21

func (s *Error) GetMessage() *string

type ErrorField added in v1.2.21

type ErrorField struct {
	RecordId *string     `json:"recordId,omitempty"`
	Property *string     `json:"property,omitempty"`
	Message  *string     `json:"message,omitempty"`
	Value    interface{} `json:"value,omitempty"`
}

func (*ErrorField) GetMessage added in v1.2.21

func (s *ErrorField) GetMessage() *string

func (*ErrorField) GetProperty added in v1.2.21

func (s *ErrorField) GetProperty() *string

func (*ErrorField) GetRecordId added in v1.2.21

func (s *ErrorField) GetRecordId() *string

func (*ErrorField) GetValue added in v1.2.21

func (s *ErrorField) GetValue() interface{}

type ErrorFieldMapper added in v1.2.21

type ErrorFieldMapper struct {
}

func NewErrorFieldMapper added in v1.2.21

func NewErrorFieldMapper() *ErrorFieldMapper

func (*ErrorFieldMapper) FromProperties added in v1.2.21

func (m *ErrorFieldMapper) FromProperties(properties map[string]*structpb.Value) *ErrorField

func (*ErrorFieldMapper) New added in v1.2.21

func (m *ErrorFieldMapper) New() *ErrorField

func (*ErrorFieldMapper) ResourceIdentity added in v1.2.21

func (m *ErrorFieldMapper) ResourceIdentity() abs.ResourceIdentity

func (*ErrorFieldMapper) ToProperties added in v1.2.21

func (m *ErrorFieldMapper) ToProperties(errorField *ErrorField) map[string]*structpb.Value

type ErrorMapper added in v1.2.21

type ErrorMapper struct {
}

func NewErrorMapper added in v1.2.21

func NewErrorMapper() *ErrorMapper

func (*ErrorMapper) FromProperties added in v1.2.21

func (m *ErrorMapper) FromProperties(properties map[string]*structpb.Value) *Error

func (*ErrorMapper) New added in v1.2.21

func (m *ErrorMapper) New() *Error

func (*ErrorMapper) ResourceIdentity added in v1.2.21

func (m *ErrorMapper) ResourceIdentity() abs.ResourceIdentity

func (*ErrorMapper) ToProperties added in v1.2.21

func (m *ErrorMapper) ToProperties(error_ *Error) map[string]*structpb.Value

type Event added in v1.2.21

type Event struct {
	Id                 string              `json:"id,omitempty"`
	Action             ExtensionAction     `json:"action,omitempty"`
	RecordSearchParams *RecordSearchParams `json:"recordSearchParams,omitempty"`
	ActionSummary      *string             `json:"actionSummary,omitempty"`
	ActionDescription  *string             `json:"actionDescription,omitempty"`
	Resource           *Resource           `json:"resource,omitempty"`
	Records            []*Record           `json:"records,omitempty"`
	Finalizes          *bool               `json:"finalizes,omitempty"`
	Sync               *bool               `json:"sync,omitempty"`
	Time               *time.Time          `json:"time,omitempty"`
	Total              *int64              `json:"total,omitempty"`
	ActionName         *string             `json:"actionName,omitempty"`
	Input              interface{}         `json:"input,omitempty"`
	Output             interface{}         `json:"output,omitempty"`
	Annotations        map[string]string   `json:"annotations,omitempty"`
	Error              *Error              `json:"error,omitempty"`
}

func (*Event) GetAction added in v1.2.21

func (s *Event) GetAction() ExtensionAction

func (*Event) GetActionDescription added in v1.2.21

func (s *Event) GetActionDescription() *string

func (*Event) GetActionName added in v1.2.21

func (s *Event) GetActionName() *string

func (*Event) GetActionSummary added in v1.2.21

func (s *Event) GetActionSummary() *string

func (*Event) GetAnnotations added in v1.2.21

func (s *Event) GetAnnotations() map[string]string

func (*Event) GetError added in v1.2.21

func (s *Event) GetError() *Error

func (*Event) GetFinalizes added in v1.2.21

func (s *Event) GetFinalizes() *bool

func (*Event) GetId added in v1.2.21

func (s *Event) GetId() string

func (*Event) GetInput added in v1.2.21

func (s *Event) GetInput() interface{}

func (*Event) GetOutput added in v1.2.21

func (s *Event) GetOutput() interface{}

func (*Event) GetRecordSearchParams added in v1.2.21

func (s *Event) GetRecordSearchParams() *RecordSearchParams

func (*Event) GetRecords added in v1.2.21

func (s *Event) GetRecords() []*Record

func (*Event) GetResource added in v1.2.21

func (s *Event) GetResource() *Resource

func (*Event) GetSync added in v1.2.21

func (s *Event) GetSync() *bool

func (*Event) GetTime added in v1.2.21

func (s *Event) GetTime() *time.Time

func (*Event) GetTotal added in v1.2.21

func (s *Event) GetTotal() *int64

type EventAction

type EventAction string
const (
	EventAction_CREATE  EventAction = "CREATE"
	EventAction_UPDATE  EventAction = "UPDATE"
	EventAction_DELETE  EventAction = "DELETE"
	EventAction_GET     EventAction = "GET"
	EventAction_LIST    EventAction = "LIST"
	EventAction_OPERATE EventAction = "OPERATE"
)

type EventMapper added in v1.2.21

type EventMapper struct {
}

func NewEventMapper added in v1.2.21

func NewEventMapper() *EventMapper

func (*EventMapper) FromProperties added in v1.2.21

func (m *EventMapper) FromProperties(properties map[string]*structpb.Value) *Event

func (*EventMapper) New added in v1.2.21

func (m *EventMapper) New() *Event

func (*EventMapper) ResourceIdentity added in v1.2.21

func (m *EventMapper) ResourceIdentity() abs.ResourceIdentity

func (*EventMapper) ToProperties added in v1.2.21

func (m *EventMapper) ToProperties(event *Event) map[string]*structpb.Value

type EventSelector added in v1.2.21

type EventSelector struct {
	Actions        []EventAction      `json:"actions,omitempty"`
	RecordSelector *BooleanExpression `json:"recordSelector,omitempty"`
	Namespaces     []string           `json:"namespaces,omitempty"`
	Resources      []string           `json:"resources,omitempty"`
	Ids            []string           `json:"ids,omitempty"`
	Annotations    map[string]string  `json:"annotations,omitempty"`
}

func (*EventSelector) GetActions added in v1.2.21

func (s *EventSelector) GetActions() []EventAction

func (*EventSelector) GetAnnotations added in v1.2.21

func (s *EventSelector) GetAnnotations() map[string]string

func (*EventSelector) GetIds added in v1.2.21

func (s *EventSelector) GetIds() []string

func (*EventSelector) GetNamespaces added in v1.2.21

func (s *EventSelector) GetNamespaces() []string

func (*EventSelector) GetRecordSelector added in v1.2.21

func (s *EventSelector) GetRecordSelector() *BooleanExpression

func (*EventSelector) GetResources added in v1.2.21

func (s *EventSelector) GetResources() []string

type EventSelectorMapper added in v1.2.21

type EventSelectorMapper struct {
}

func NewEventSelectorMapper added in v1.2.21

func NewEventSelectorMapper() *EventSelectorMapper

func (*EventSelectorMapper) FromProperties added in v1.2.21

func (m *EventSelectorMapper) FromProperties(properties map[string]*structpb.Value) *EventSelector

func (*EventSelectorMapper) New added in v1.2.21

func (*EventSelectorMapper) ResourceIdentity added in v1.2.21

func (m *EventSelectorMapper) ResourceIdentity() abs.ResourceIdentity

func (*EventSelectorMapper) ToProperties added in v1.2.21

func (m *EventSelectorMapper) ToProperties(eventSelector *EventSelector) map[string]*structpb.Value

type Expression added in v1.2.39

type Expression struct {
	Property *string     `json:"property,omitempty"`
	Value    interface{} `json:"value,omitempty"`
}

func (*Expression) GetProperty added in v1.2.39

func (s *Expression) GetProperty() *string

func (*Expression) GetValue added in v1.2.39

func (s *Expression) GetValue() interface{}

type ExpressionMapper added in v1.2.39

type ExpressionMapper struct {
}

func NewExpressionMapper added in v1.2.39

func NewExpressionMapper() *ExpressionMapper

func (*ExpressionMapper) FromProperties added in v1.2.39

func (m *ExpressionMapper) FromProperties(properties map[string]*structpb.Value) *Expression

func (*ExpressionMapper) New added in v1.2.39

func (m *ExpressionMapper) New() *Expression

func (*ExpressionMapper) ResourceIdentity added in v1.2.39

func (m *ExpressionMapper) ResourceIdentity() abs.ResourceIdentity

func (*ExpressionMapper) ToProperties added in v1.2.39

func (m *ExpressionMapper) ToProperties(expression *Expression) map[string]*structpb.Value

type Extension

type Extension struct {
	Id          *uuid.UUID          `json:"id,omitempty"`
	Version     int32               `json:"version,omitempty"`
	AuditData   *ExtensionAuditData `json:"auditData,omitempty"`
	Name        string              `json:"name,omitempty"`
	Description *string             `json:"description,omitempty"`
	Selector    *EventSelector      `json:"selector,omitempty"`
	Order       int32               `json:"order,omitempty"`
	Finalizes   bool                `json:"finalizes,omitempty"`
	Sync        bool                `json:"sync,omitempty"`
	Responds    bool                `json:"responds,omitempty"`
	Call        ExternalCall        `json:"call,omitempty"`
	Annotations map[string]string   `json:"annotations,omitempty"`
}

func (*Extension) GetAnnotations

func (s *Extension) GetAnnotations() map[string]string

func (*Extension) GetAuditData added in v1.2.36

func (s *Extension) GetAuditData() *ExtensionAuditData

func (*Extension) GetCall

func (s *Extension) GetCall() ExternalCall

func (*Extension) GetDescription

func (s *Extension) GetDescription() *string

func (*Extension) GetFinalizes

func (s *Extension) GetFinalizes() bool

func (*Extension) GetId

func (s *Extension) GetId() *uuid.UUID

func (*Extension) GetName

func (s *Extension) GetName() string

func (*Extension) GetOrder

func (s *Extension) GetOrder() int32

func (*Extension) GetResponds

func (s *Extension) GetResponds() bool

func (*Extension) GetSelector

func (s *Extension) GetSelector() *EventSelector

func (*Extension) GetSync

func (s *Extension) GetSync() bool

func (*Extension) GetVersion

func (s *Extension) GetVersion() int32

type ExtensionAction added in v1.1.48

type ExtensionAction string
const (
	ExtensionAction_CREATE  ExtensionAction = "CREATE"
	ExtensionAction_UPDATE  ExtensionAction = "UPDATE"
	ExtensionAction_DELETE  ExtensionAction = "DELETE"
	ExtensionAction_GET     ExtensionAction = "GET"
	ExtensionAction_LIST    ExtensionAction = "LIST"
	ExtensionAction_OPERATE ExtensionAction = "OPERATE"
)

type ExtensionAuditData added in v1.2.36

type ExtensionAuditData struct {
	CreatedBy *string    `json:"createdBy,omitempty"`
	UpdatedBy *string    `json:"updatedBy,omitempty"`
	CreatedOn *time.Time `json:"createdOn,omitempty"`
	UpdatedOn *time.Time `json:"updatedOn,omitempty"`
}

func (*ExtensionAuditData) GetCreatedBy added in v1.2.36

func (s *ExtensionAuditData) GetCreatedBy() *string

func (*ExtensionAuditData) GetCreatedOn added in v1.2.36

func (s *ExtensionAuditData) GetCreatedOn() *time.Time

func (*ExtensionAuditData) GetUpdatedBy added in v1.2.36

func (s *ExtensionAuditData) GetUpdatedBy() *string

func (*ExtensionAuditData) GetUpdatedOn added in v1.2.36

func (s *ExtensionAuditData) GetUpdatedOn() *time.Time

type ExtensionAuditDataMapper added in v1.2.36

type ExtensionAuditDataMapper struct {
}

func NewExtensionAuditDataMapper added in v1.2.36

func NewExtensionAuditDataMapper() *ExtensionAuditDataMapper

func (*ExtensionAuditDataMapper) FromProperties added in v1.2.36

func (m *ExtensionAuditDataMapper) FromProperties(properties map[string]*structpb.Value) *ExtensionAuditData

func (*ExtensionAuditDataMapper) New added in v1.2.36

func (*ExtensionAuditDataMapper) ResourceIdentity added in v1.2.36

func (m *ExtensionAuditDataMapper) ResourceIdentity() abs.ResourceIdentity

func (*ExtensionAuditDataMapper) ToProperties added in v1.2.36

func (m *ExtensionAuditDataMapper) ToProperties(extensionAuditData *ExtensionAuditData) map[string]*structpb.Value

type ExtensionCode added in v1.1.48

type ExtensionCode string
const (
	ExtensionCode_UNKNOWNERROR                      ExtensionCode = "UNKNOWN_ERROR"
	ExtensionCode_RECORDNOTFOUND                    ExtensionCode = "RECORD_NOT_FOUND"
	ExtensionCode_UNABLETOLOCATEPRIMARYKEY          ExtensionCode = "UNABLE_TO_LOCATE_PRIMARY_KEY"
	ExtensionCode_INTERNALERROR                     ExtensionCode = "INTERNAL_ERROR"
	ExtensionCode_PROPERTYNOTFOUND                  ExtensionCode = "PROPERTY_NOT_FOUND"
	ExtensionCode_RECORDVALIDATIONERROR             ExtensionCode = "RECORD_VALIDATION_ERROR"
	ExtensionCode_RESOURCEVALIDATIONERROR           ExtensionCode = "RESOURCE_VALIDATION_ERROR"
	ExtensionCode_AUTHENTICATIONFAILED              ExtensionCode = "AUTHENTICATION_FAILED"
	ExtensionCode_ALREADYEXISTS                     ExtensionCode = "ALREADY_EXISTS"
	ExtensionCode_ACCESSDENIED                      ExtensionCode = "ACCESS_DENIED"
	ExtensionCode_BACKENDERROR                      ExtensionCode = "BACKEND_ERROR"
	ExtensionCode_UNIQUEVIOLATION                   ExtensionCode = "UNIQUE_VIOLATION"
	ExtensionCode_REFERENCEVIOLATION                ExtensionCode = "REFERENCE_VIOLATION"
	ExtensionCode_RESOURCENOTFOUND                  ExtensionCode = "RESOURCE_NOT_FOUND"
	ExtensionCode_UNSUPPORTEDOPERATION              ExtensionCode = "UNSUPPORTED_OPERATION"
	ExtensionCode_EXTERNALBACKENDCOMMUNICATIONERROR ExtensionCode = "EXTERNAL_BACKEND_COMMUNICATION_ERROR"
	ExtensionCode_EXTERNALBACKENDERROR              ExtensionCode = "EXTERNAL_BACKEND_ERROR"
	ExtensionCode_RATELIMITERROR                    ExtensionCode = "RATE_LIMIT_ERROR"
)

type ExtensionMapper

type ExtensionMapper struct {
}

func NewExtensionMapper

func NewExtensionMapper() *ExtensionMapper

func (*ExtensionMapper) FromProperties

func (m *ExtensionMapper) FromProperties(properties map[string]*structpb.Value) *Extension

func (*ExtensionMapper) FromRecord

func (m *ExtensionMapper) FromRecord(record *model.Record) *Extension

func (*ExtensionMapper) New

func (m *ExtensionMapper) New() *Extension

func (*ExtensionMapper) ResourceIdentity

func (m *ExtensionMapper) ResourceIdentity() abs.ResourceIdentity

func (*ExtensionMapper) ToProperties

func (m *ExtensionMapper) ToProperties(extension *Extension) map[string]*structpb.Value

func (*ExtensionMapper) ToRecord

func (m *ExtensionMapper) ToRecord(extension *Extension) *model.Record

type ExternalCall added in v1.2.21

type ExternalCall struct {
	FunctionCall *FunctionCall `json:"functionCall,omitempty"`
	HttpCall     *HttpCall     `json:"httpCall,omitempty"`
	ChannelCall  *ChannelCall  `json:"channelCall,omitempty"`
}

func (*ExternalCall) GetChannelCall added in v1.2.21

func (s *ExternalCall) GetChannelCall() *ChannelCall

func (*ExternalCall) GetFunctionCall added in v1.2.21

func (s *ExternalCall) GetFunctionCall() *FunctionCall

func (*ExternalCall) GetHttpCall added in v1.2.21

func (s *ExternalCall) GetHttpCall() *HttpCall

type ExternalCallMapper added in v1.2.21

type ExternalCallMapper struct {
}

func NewExternalCallMapper added in v1.2.21

func NewExternalCallMapper() *ExternalCallMapper

func (*ExternalCallMapper) FromProperties added in v1.2.21

func (m *ExternalCallMapper) FromProperties(properties map[string]*structpb.Value) *ExternalCall

func (*ExternalCallMapper) New added in v1.2.21

func (m *ExternalCallMapper) New() *ExternalCall

func (*ExternalCallMapper) ResourceIdentity added in v1.2.21

func (m *ExternalCallMapper) ResourceIdentity() abs.ResourceIdentity

func (*ExternalCallMapper) ToProperties added in v1.2.21

func (m *ExternalCallMapper) ToProperties(externalCall *ExternalCall) map[string]*structpb.Value

type FunctionCall added in v1.2.21

type FunctionCall struct {
	Host         string `json:"host,omitempty"`
	FunctionName string `json:"functionName,omitempty"`
}

func (*FunctionCall) GetFunctionName added in v1.2.21

func (s *FunctionCall) GetFunctionName() string

func (*FunctionCall) GetHost added in v1.2.21

func (s *FunctionCall) GetHost() string

type FunctionCallMapper added in v1.2.21

type FunctionCallMapper struct {
}

func NewFunctionCallMapper added in v1.2.21

func NewFunctionCallMapper() *FunctionCallMapper

func (*FunctionCallMapper) FromProperties added in v1.2.21

func (m *FunctionCallMapper) FromProperties(properties map[string]*structpb.Value) *FunctionCall

func (*FunctionCallMapper) New added in v1.2.21

func (m *FunctionCallMapper) New() *FunctionCall

func (*FunctionCallMapper) ResourceIdentity added in v1.2.21

func (m *FunctionCallMapper) ResourceIdentity() abs.ResourceIdentity

func (*FunctionCallMapper) ToProperties added in v1.2.21

func (m *FunctionCallMapper) ToProperties(functionCall *FunctionCall) map[string]*structpb.Value

type HttpCall added in v1.2.21

type HttpCall struct {
	Uri    string `json:"uri,omitempty"`
	Method string `json:"method,omitempty"`
}

func (*HttpCall) GetMethod added in v1.2.21

func (s *HttpCall) GetMethod() string

func (*HttpCall) GetUri added in v1.2.21

func (s *HttpCall) GetUri() string

type HttpCallMapper added in v1.2.21

type HttpCallMapper struct {
}

func NewHttpCallMapper added in v1.2.21

func NewHttpCallMapper() *HttpCallMapper

func (*HttpCallMapper) FromProperties added in v1.2.21

func (m *HttpCallMapper) FromProperties(properties map[string]*structpb.Value) *HttpCall

func (*HttpCallMapper) New added in v1.2.21

func (m *HttpCallMapper) New() *HttpCall

func (*HttpCallMapper) ResourceIdentity added in v1.2.21

func (m *HttpCallMapper) ResourceIdentity() abs.ResourceIdentity

func (*HttpCallMapper) ToProperties added in v1.2.21

func (m *HttpCallMapper) ToProperties(httpCall *HttpCall) map[string]*structpb.Value

type Namespace

type Namespace struct {
	Id          *uuid.UUID          `json:"id,omitempty"`
	Version     int32               `json:"version,omitempty"`
	AuditData   *NamespaceAuditData `json:"auditData,omitempty"`
	Name        string              `json:"name,omitempty"`
	Description *string             `json:"description,omitempty"`
	Details     interface{}         `json:"details,omitempty"`
}

func (*Namespace) GetAuditData added in v1.2.36

func (s *Namespace) GetAuditData() *NamespaceAuditData

func (*Namespace) GetDescription

func (s *Namespace) GetDescription() *string

func (*Namespace) GetDetails

func (s *Namespace) GetDetails() interface{}

func (*Namespace) GetId

func (s *Namespace) GetId() *uuid.UUID

func (*Namespace) GetName

func (s *Namespace) GetName() string

func (*Namespace) GetVersion

func (s *Namespace) GetVersion() int32

type NamespaceAuditData added in v1.2.36

type NamespaceAuditData struct {
	CreatedBy *string    `json:"createdBy,omitempty"`
	UpdatedBy *string    `json:"updatedBy,omitempty"`
	CreatedOn *time.Time `json:"createdOn,omitempty"`
	UpdatedOn *time.Time `json:"updatedOn,omitempty"`
}

func (*NamespaceAuditData) GetCreatedBy added in v1.2.36

func (s *NamespaceAuditData) GetCreatedBy() *string

func (*NamespaceAuditData) GetCreatedOn added in v1.2.36

func (s *NamespaceAuditData) GetCreatedOn() *time.Time

func (*NamespaceAuditData) GetUpdatedBy added in v1.2.36

func (s *NamespaceAuditData) GetUpdatedBy() *string

func (*NamespaceAuditData) GetUpdatedOn added in v1.2.36

func (s *NamespaceAuditData) GetUpdatedOn() *time.Time

type NamespaceAuditDataMapper added in v1.2.36

type NamespaceAuditDataMapper struct {
}

func NewNamespaceAuditDataMapper added in v1.2.36

func NewNamespaceAuditDataMapper() *NamespaceAuditDataMapper

func (*NamespaceAuditDataMapper) FromProperties added in v1.2.36

func (m *NamespaceAuditDataMapper) FromProperties(properties map[string]*structpb.Value) *NamespaceAuditData

func (*NamespaceAuditDataMapper) New added in v1.2.36

func (*NamespaceAuditDataMapper) ResourceIdentity added in v1.2.36

func (m *NamespaceAuditDataMapper) ResourceIdentity() abs.ResourceIdentity

func (*NamespaceAuditDataMapper) ToProperties added in v1.2.36

func (m *NamespaceAuditDataMapper) ToProperties(namespaceAuditData *NamespaceAuditData) map[string]*structpb.Value

type NamespaceMapper

type NamespaceMapper struct {
}

func NewNamespaceMapper

func NewNamespaceMapper() *NamespaceMapper

func (*NamespaceMapper) FromProperties

func (m *NamespaceMapper) FromProperties(properties map[string]*structpb.Value) *Namespace

func (*NamespaceMapper) FromRecord

func (m *NamespaceMapper) FromRecord(record *model.Record) *Namespace

func (*NamespaceMapper) New

func (m *NamespaceMapper) New() *Namespace

func (*NamespaceMapper) ResourceIdentity

func (m *NamespaceMapper) ResourceIdentity() abs.ResourceIdentity

func (*NamespaceMapper) ToProperties

func (m *NamespaceMapper) ToProperties(namespace *Namespace) map[string]*structpb.Value

func (*NamespaceMapper) ToRecord

func (m *NamespaceMapper) ToRecord(namespace *Namespace) *model.Record

type PairExpression added in v1.2.39

type PairExpression struct {
	Left  *Expression `json:"left,omitempty"`
	Right *Expression `json:"right,omitempty"`
}

func (*PairExpression) GetLeft added in v1.2.39

func (s *PairExpression) GetLeft() *Expression

func (*PairExpression) GetRight added in v1.2.39

func (s *PairExpression) GetRight() *Expression

type PairExpressionMapper added in v1.2.39

type PairExpressionMapper struct {
}

func NewPairExpressionMapper added in v1.2.39

func NewPairExpressionMapper() *PairExpressionMapper

func (*PairExpressionMapper) FromProperties added in v1.2.39

func (m *PairExpressionMapper) FromProperties(properties map[string]*structpb.Value) *PairExpression

func (*PairExpressionMapper) New added in v1.2.39

func (*PairExpressionMapper) ResourceIdentity added in v1.2.39

func (m *PairExpressionMapper) ResourceIdentity() abs.ResourceIdentity

func (*PairExpressionMapper) ToProperties added in v1.2.39

func (m *PairExpressionMapper) ToProperties(pairExpression *PairExpression) map[string]*structpb.Value

type Permission added in v1.1.40

type Permission struct {
	Id             *uuid.UUID           `json:"id,omitempty"`
	Version        int32                `json:"version,omitempty"`
	AuditData      *PermissionAuditData `json:"auditData,omitempty"`
	Namespace      *string              `json:"namespace,omitempty"`
	Resource       *string              `json:"resource,omitempty"`
	RecordSelector *BooleanExpression   `json:"recordSelector,omitempty"`
	Operation      PermissionOperation  `json:"operation,omitempty"`
	Before         *time.Time           `json:"before,omitempty"`
	After          *time.Time           `json:"after,omitempty"`
	User           *User                `json:"user,omitempty"`
	Role           *Role                `json:"role,omitempty"`
	Permit         PermissionPermit     `json:"permit,omitempty"`
	LocalFlags     interface{}          `json:"localFlags,omitempty"`
}

func (*Permission) GetAfter added in v1.1.40

func (s *Permission) GetAfter() *time.Time

func (*Permission) GetAuditData added in v1.2.36

func (s *Permission) GetAuditData() *PermissionAuditData

func (*Permission) GetBefore added in v1.1.40

func (s *Permission) GetBefore() *time.Time

func (*Permission) GetId added in v1.1.40

func (s *Permission) GetId() *uuid.UUID

func (*Permission) GetLocalFlags added in v1.1.40

func (s *Permission) GetLocalFlags() interface{}

func (*Permission) GetNamespace added in v1.1.40

func (s *Permission) GetNamespace() *string

func (*Permission) GetOperation added in v1.1.40

func (s *Permission) GetOperation() PermissionOperation

func (*Permission) GetPermit added in v1.1.40

func (s *Permission) GetPermit() PermissionPermit

func (*Permission) GetRecordSelector added in v1.2.39

func (s *Permission) GetRecordSelector() *BooleanExpression

func (*Permission) GetResource added in v1.1.40

func (s *Permission) GetResource() *string

func (*Permission) GetRole added in v1.1.40

func (s *Permission) GetRole() *Role

func (*Permission) GetUser added in v1.1.40

func (s *Permission) GetUser() *User

func (*Permission) GetVersion added in v1.1.40

func (s *Permission) GetVersion() int32

type PermissionAuditData added in v1.2.36

type PermissionAuditData struct {
	CreatedBy *string    `json:"createdBy,omitempty"`
	UpdatedBy *string    `json:"updatedBy,omitempty"`
	CreatedOn *time.Time `json:"createdOn,omitempty"`
	UpdatedOn *time.Time `json:"updatedOn,omitempty"`
}

func (*PermissionAuditData) GetCreatedBy added in v1.2.36

func (s *PermissionAuditData) GetCreatedBy() *string

func (*PermissionAuditData) GetCreatedOn added in v1.2.36

func (s *PermissionAuditData) GetCreatedOn() *time.Time

func (*PermissionAuditData) GetUpdatedBy added in v1.2.36

func (s *PermissionAuditData) GetUpdatedBy() *string

func (*PermissionAuditData) GetUpdatedOn added in v1.2.36

func (s *PermissionAuditData) GetUpdatedOn() *time.Time

type PermissionAuditDataMapper added in v1.2.36

type PermissionAuditDataMapper struct {
}

func NewPermissionAuditDataMapper added in v1.2.36

func NewPermissionAuditDataMapper() *PermissionAuditDataMapper

func (*PermissionAuditDataMapper) FromProperties added in v1.2.36

func (m *PermissionAuditDataMapper) FromProperties(properties map[string]*structpb.Value) *PermissionAuditData

func (*PermissionAuditDataMapper) New added in v1.2.36

func (*PermissionAuditDataMapper) ResourceIdentity added in v1.2.36

func (m *PermissionAuditDataMapper) ResourceIdentity() abs.ResourceIdentity

func (*PermissionAuditDataMapper) ToProperties added in v1.2.36

func (m *PermissionAuditDataMapper) ToProperties(permissionAuditData *PermissionAuditData) map[string]*structpb.Value

type PermissionMapper added in v1.1.44

type PermissionMapper struct {
}

func NewPermissionMapper added in v1.1.44

func NewPermissionMapper() *PermissionMapper

func (*PermissionMapper) FromProperties added in v1.1.44

func (m *PermissionMapper) FromProperties(properties map[string]*structpb.Value) *Permission

func (*PermissionMapper) FromRecord added in v1.1.44

func (m *PermissionMapper) FromRecord(record *model.Record) *Permission

func (*PermissionMapper) New added in v1.1.44

func (m *PermissionMapper) New() *Permission

func (*PermissionMapper) ResourceIdentity added in v1.1.44

func (m *PermissionMapper) ResourceIdentity() abs.ResourceIdentity

func (*PermissionMapper) ToProperties added in v1.1.44

func (m *PermissionMapper) ToProperties(permission *Permission) map[string]*structpb.Value

func (*PermissionMapper) ToRecord added in v1.1.44

func (m *PermissionMapper) ToRecord(permission *Permission) *model.Record

type PermissionOperation added in v1.1.44

type PermissionOperation string
const (
	PermissionOperation_READ   PermissionOperation = "READ"
	PermissionOperation_CREATE PermissionOperation = "CREATE"
	PermissionOperation_UPDATE PermissionOperation = "UPDATE"
	PermissionOperation_DELETE PermissionOperation = "DELETE"
	PermissionOperation_FULL   PermissionOperation = "FULL"
)

type PermissionPermit added in v1.1.44

type PermissionPermit string
const (
	PermissionPermit_ALLOW  PermissionPermit = "ALLOW"
	PermissionPermit_REJECT PermissionPermit = "REJECT"
)

type Property added in v1.2.21

type Property struct {
	Type          ResourceType      `json:"type,omitempty"`
	TypeRef       *string           `json:"typeRef,omitempty"`
	Primary       bool              `json:"primary,omitempty"`
	Required      bool              `json:"required,omitempty"`
	Unique        bool              `json:"unique,omitempty"`
	Immutable     bool              `json:"immutable,omitempty"`
	Length        int32             `json:"length,omitempty"`
	Item          *Property         `json:"item,omitempty"`
	Reference     *string           `json:"reference,omitempty"`
	BackReference *string           `json:"backReference,omitempty"`
	DefaultValue  interface{}       `json:"defaultValue,omitempty"`
	EnumValues    []string          `json:"enumValues,omitempty"`
	ExampleValue  interface{}       `json:"exampleValue,omitempty"`
	Title         *string           `json:"title,omitempty"`
	Description   *string           `json:"description,omitempty"`
	Annotations   map[string]string `json:"annotations,omitempty"`
}

func (*Property) GetAnnotations added in v1.2.21

func (s *Property) GetAnnotations() map[string]string

func (*Property) GetBackReference added in v1.2.85

func (s *Property) GetBackReference() *string

func (*Property) GetDefaultValue added in v1.2.21

func (s *Property) GetDefaultValue() interface{}

func (*Property) GetDescription added in v1.2.21

func (s *Property) GetDescription() *string

func (*Property) GetEnumValues added in v1.2.21

func (s *Property) GetEnumValues() []string

func (*Property) GetExampleValue added in v1.2.21

func (s *Property) GetExampleValue() interface{}

func (*Property) GetImmutable added in v1.2.21

func (s *Property) GetImmutable() bool

func (*Property) GetItem added in v1.2.21

func (s *Property) GetItem() *Property

func (*Property) GetLength added in v1.2.21

func (s *Property) GetLength() int32

func (*Property) GetPrimary added in v1.2.21

func (s *Property) GetPrimary() bool

func (*Property) GetReference added in v1.2.21

func (s *Property) GetReference() *string

func (*Property) GetRequired added in v1.2.21

func (s *Property) GetRequired() bool

func (*Property) GetTitle added in v1.2.21

func (s *Property) GetTitle() *string

func (*Property) GetType added in v1.2.21

func (s *Property) GetType() ResourceType

func (*Property) GetTypeRef added in v1.2.21

func (s *Property) GetTypeRef() *string

func (*Property) GetUnique added in v1.2.21

func (s *Property) GetUnique() bool

type PropertyMapper added in v1.2.21

type PropertyMapper struct {
}

func NewPropertyMapper added in v1.2.21

func NewPropertyMapper() *PropertyMapper

func (*PropertyMapper) FromProperties added in v1.2.21

func (m *PropertyMapper) FromProperties(properties map[string]*structpb.Value) *Property

func (*PropertyMapper) New added in v1.2.21

func (m *PropertyMapper) New() *Property

func (*PropertyMapper) ResourceIdentity added in v1.2.21

func (m *PropertyMapper) ResourceIdentity() abs.ResourceIdentity

func (*PropertyMapper) ToProperties added in v1.2.21

func (m *PropertyMapper) ToProperties(property *Property) map[string]*structpb.Value

type Record

type Record struct {
	Id               *uuid.UUID    `json:"id,omitempty"`
	Properties       interface{}   `json:"properties,omitempty"`
	PackedProperties []interface{} `json:"packedProperties,omitempty"`
}

func (*Record) GetId

func (s *Record) GetId() *uuid.UUID

func (*Record) GetPackedProperties

func (s *Record) GetPackedProperties() []interface{}

func (*Record) GetProperties

func (s *Record) GetProperties() interface{}

type RecordMapper

type RecordMapper struct {
}

func NewRecordMapper

func NewRecordMapper() *RecordMapper

func (*RecordMapper) FromProperties

func (m *RecordMapper) FromProperties(properties map[string]*structpb.Value) *Record

func (*RecordMapper) FromRecord

func (m *RecordMapper) FromRecord(record *model.Record) *Record

func (*RecordMapper) New

func (m *RecordMapper) New() *Record

func (*RecordMapper) ResourceIdentity

func (m *RecordMapper) ResourceIdentity() abs.ResourceIdentity

func (*RecordMapper) ToProperties

func (m *RecordMapper) ToProperties(record *Record) map[string]*structpb.Value

func (*RecordMapper) ToRecord

func (m *RecordMapper) ToRecord(record *Record) *model.Record

type RecordSearchParams added in v1.2.21

type RecordSearchParams struct {
	Query             *BooleanExpression `json:"query,omitempty"`
	Limit             *int32             `json:"limit,omitempty"`
	Offset            *int32             `json:"offset,omitempty"`
	ResolveReferences []string           `json:"resolveReferences,omitempty"`
}

func (*RecordSearchParams) GetLimit added in v1.2.21

func (s *RecordSearchParams) GetLimit() *int32

func (*RecordSearchParams) GetOffset added in v1.2.21

func (s *RecordSearchParams) GetOffset() *int32

func (*RecordSearchParams) GetQuery added in v1.2.21

func (s *RecordSearchParams) GetQuery() *BooleanExpression

func (*RecordSearchParams) GetResolveReferences added in v1.2.21

func (s *RecordSearchParams) GetResolveReferences() []string

type RecordSearchParamsMapper added in v1.2.21

type RecordSearchParamsMapper struct {
}

func NewRecordSearchParamsMapper added in v1.2.21

func NewRecordSearchParamsMapper() *RecordSearchParamsMapper

func (*RecordSearchParamsMapper) FromProperties added in v1.2.21

func (m *RecordSearchParamsMapper) FromProperties(properties map[string]*structpb.Value) *RecordSearchParams

func (*RecordSearchParamsMapper) New added in v1.2.21

func (*RecordSearchParamsMapper) ResourceIdentity added in v1.2.21

func (m *RecordSearchParamsMapper) ResourceIdentity() abs.ResourceIdentity

func (*RecordSearchParamsMapper) ToProperties added in v1.2.21

func (m *RecordSearchParamsMapper) ToProperties(recordSearchParams *RecordSearchParams) map[string]*structpb.Value

type RegexMatchExpression added in v1.2.39

type RegexMatchExpression struct {
	Pattern    *string     `json:"pattern,omitempty"`
	Expression *Expression `json:"expression,omitempty"`
}

func (*RegexMatchExpression) GetExpression added in v1.2.39

func (s *RegexMatchExpression) GetExpression() *Expression

func (*RegexMatchExpression) GetPattern added in v1.2.39

func (s *RegexMatchExpression) GetPattern() *string

type RegexMatchExpressionMapper added in v1.2.39

type RegexMatchExpressionMapper struct {
}

func NewRegexMatchExpressionMapper added in v1.2.39

func NewRegexMatchExpressionMapper() *RegexMatchExpressionMapper

func (*RegexMatchExpressionMapper) FromProperties added in v1.2.39

func (m *RegexMatchExpressionMapper) FromProperties(properties map[string]*structpb.Value) *RegexMatchExpression

func (*RegexMatchExpressionMapper) New added in v1.2.39

func (*RegexMatchExpressionMapper) ResourceIdentity added in v1.2.39

func (m *RegexMatchExpressionMapper) ResourceIdentity() abs.ResourceIdentity

func (*RegexMatchExpressionMapper) ToProperties added in v1.2.39

func (m *RegexMatchExpressionMapper) ToProperties(regexMatchExpression *RegexMatchExpression) map[string]*structpb.Value

type Resource

type Resource struct {
	Id              *uuid.UUID          `json:"id,omitempty"`
	Version         int32               `json:"version,omitempty"`
	AuditData       *ResourceAuditData  `json:"auditData,omitempty"`
	Name            string              `json:"name,omitempty"`
	Namespace       *Namespace          `json:"namespace,omitempty"`
	Virtual         bool                `json:"virtual,omitempty"`
	Properties      map[string]Property `json:"properties,omitempty"`
	Indexes         []ResourceIndex     `json:"indexes,omitempty"`
	Types           []SubType           `json:"types,omitempty"`
	Immutable       bool                `json:"immutable,omitempty"`
	Abstract        bool                `json:"abstract,omitempty"`
	CheckReferences bool                `json:"checkReferences,omitempty"`
	DataSource      *DataSource         `json:"dataSource,omitempty"`
	Entity          *string             `json:"entity,omitempty"`
	Catalog         *string             `json:"catalog,omitempty"`
	Title           *string             `json:"title,omitempty"`
	Description     *string             `json:"description,omitempty"`
	Annotations     map[string]string   `json:"annotations,omitempty"`
}

func (*Resource) GetAbstract

func (s *Resource) GetAbstract() bool

func (*Resource) GetAnnotations

func (s *Resource) GetAnnotations() map[string]string

func (*Resource) GetAuditData added in v1.2.36

func (s *Resource) GetAuditData() *ResourceAuditData

func (*Resource) GetCatalog

func (s *Resource) GetCatalog() *string

func (*Resource) GetCheckReferences

func (s *Resource) GetCheckReferences() bool

func (*Resource) GetDataSource

func (s *Resource) GetDataSource() *DataSource

func (*Resource) GetDescription

func (s *Resource) GetDescription() *string

func (*Resource) GetEntity

func (s *Resource) GetEntity() *string

func (*Resource) GetId

func (s *Resource) GetId() *uuid.UUID

func (*Resource) GetImmutable

func (s *Resource) GetImmutable() bool

func (*Resource) GetIndexes

func (s *Resource) GetIndexes() []ResourceIndex

func (*Resource) GetName

func (s *Resource) GetName() string

func (*Resource) GetNamespace

func (s *Resource) GetNamespace() *Namespace

func (*Resource) GetProperties

func (s *Resource) GetProperties() map[string]Property

func (*Resource) GetTitle

func (s *Resource) GetTitle() *string

func (*Resource) GetTypes

func (s *Resource) GetTypes() []SubType

func (*Resource) GetVersion

func (s *Resource) GetVersion() int32

func (*Resource) GetVirtual

func (s *Resource) GetVirtual() bool

type ResourceAction added in v1.2.21

type ResourceAction struct {
	Id          *uuid.UUID               `json:"id,omitempty"`
	Version     int32                    `json:"version,omitempty"`
	AuditData   *ResourceActionAuditData `json:"auditData,omitempty"`
	Resource    *Resource                `json:"resource,omitempty"`
	Name        string                   `json:"name,omitempty"`
	Title       *string                  `json:"title,omitempty"`
	Description *string                  `json:"description,omitempty"`
	Internal    bool                     `json:"internal,omitempty"`
	Types       []SubType                `json:"types,omitempty"`
	Input       map[string]Property      `json:"input,omitempty"`
	Output      *Property                `json:"output,omitempty"`
	Annotations map[string]string        `json:"annotations,omitempty"`
}

func (*ResourceAction) GetAnnotations added in v1.2.21

func (s *ResourceAction) GetAnnotations() map[string]string

func (*ResourceAction) GetAuditData added in v1.2.36

func (s *ResourceAction) GetAuditData() *ResourceActionAuditData

func (*ResourceAction) GetDescription added in v1.2.21

func (s *ResourceAction) GetDescription() *string

func (*ResourceAction) GetId added in v1.2.21

func (s *ResourceAction) GetId() *uuid.UUID

func (*ResourceAction) GetInput added in v1.2.21

func (s *ResourceAction) GetInput() map[string]Property

func (*ResourceAction) GetInternal added in v1.2.21

func (s *ResourceAction) GetInternal() bool

func (*ResourceAction) GetName added in v1.2.21

func (s *ResourceAction) GetName() string

func (*ResourceAction) GetOutput added in v1.2.21

func (s *ResourceAction) GetOutput() *Property

func (*ResourceAction) GetResource added in v1.2.21

func (s *ResourceAction) GetResource() *Resource

func (*ResourceAction) GetTitle added in v1.2.21

func (s *ResourceAction) GetTitle() *string

func (*ResourceAction) GetTypes added in v1.2.21

func (s *ResourceAction) GetTypes() []SubType

func (*ResourceAction) GetVersion added in v1.2.21

func (s *ResourceAction) GetVersion() int32

type ResourceActionAuditData added in v1.2.36

type ResourceActionAuditData struct {
	CreatedBy *string    `json:"createdBy,omitempty"`
	UpdatedBy *string    `json:"updatedBy,omitempty"`
	CreatedOn *time.Time `json:"createdOn,omitempty"`
	UpdatedOn *time.Time `json:"updatedOn,omitempty"`
}

func (*ResourceActionAuditData) GetCreatedBy added in v1.2.36

func (s *ResourceActionAuditData) GetCreatedBy() *string

func (*ResourceActionAuditData) GetCreatedOn added in v1.2.36

func (s *ResourceActionAuditData) GetCreatedOn() *time.Time

func (*ResourceActionAuditData) GetUpdatedBy added in v1.2.36

func (s *ResourceActionAuditData) GetUpdatedBy() *string

func (*ResourceActionAuditData) GetUpdatedOn added in v1.2.36

func (s *ResourceActionAuditData) GetUpdatedOn() *time.Time

type ResourceActionAuditDataMapper added in v1.2.36

type ResourceActionAuditDataMapper struct {
}

func NewResourceActionAuditDataMapper added in v1.2.36

func NewResourceActionAuditDataMapper() *ResourceActionAuditDataMapper

func (*ResourceActionAuditDataMapper) FromProperties added in v1.2.36

func (m *ResourceActionAuditDataMapper) FromProperties(properties map[string]*structpb.Value) *ResourceActionAuditData

func (*ResourceActionAuditDataMapper) New added in v1.2.36

func (*ResourceActionAuditDataMapper) ResourceIdentity added in v1.2.36

func (m *ResourceActionAuditDataMapper) ResourceIdentity() abs.ResourceIdentity

func (*ResourceActionAuditDataMapper) ToProperties added in v1.2.36

func (m *ResourceActionAuditDataMapper) ToProperties(resourceActionAuditData *ResourceActionAuditData) map[string]*structpb.Value

type ResourceActionMapper added in v1.2.21

type ResourceActionMapper struct {
}

func NewResourceActionMapper added in v1.2.21

func NewResourceActionMapper() *ResourceActionMapper

func (*ResourceActionMapper) FromProperties added in v1.2.21

func (m *ResourceActionMapper) FromProperties(properties map[string]*structpb.Value) *ResourceAction

func (*ResourceActionMapper) FromRecord added in v1.2.21

func (m *ResourceActionMapper) FromRecord(record *model.Record) *ResourceAction

func (*ResourceActionMapper) New added in v1.2.21

func (*ResourceActionMapper) ResourceIdentity added in v1.2.21

func (m *ResourceActionMapper) ResourceIdentity() abs.ResourceIdentity

func (*ResourceActionMapper) ToProperties added in v1.2.21

func (m *ResourceActionMapper) ToProperties(resourceAction *ResourceAction) map[string]*structpb.Value

func (*ResourceActionMapper) ToRecord added in v1.2.21

func (m *ResourceActionMapper) ToRecord(resourceAction *ResourceAction) *model.Record

type ResourceActionType added in v1.2.21

type ResourceActionType string
const (
	ResourceActionType_BOOL      ResourceActionType = "BOOL"
	ResourceActionType_STRING    ResourceActionType = "STRING"
	ResourceActionType_FLOAT32   ResourceActionType = "FLOAT32"
	ResourceActionType_FLOAT64   ResourceActionType = "FLOAT64"
	ResourceActionType_INT32     ResourceActionType = "INT32"
	ResourceActionType_INT64     ResourceActionType = "INT64"
	ResourceActionType_BYTES     ResourceActionType = "BYTES"
	ResourceActionType_UUID      ResourceActionType = "UUID"
	ResourceActionType_DATE      ResourceActionType = "DATE"
	ResourceActionType_TIME      ResourceActionType = "TIME"
	ResourceActionType_TIMESTAMP ResourceActionType = "TIMESTAMP"
	ResourceActionType_OBJECT    ResourceActionType = "OBJECT"
	ResourceActionType_MAP       ResourceActionType = "MAP"
	ResourceActionType_LIST      ResourceActionType = "LIST"
	ResourceActionType_REFERENCE ResourceActionType = "REFERENCE"
	ResourceActionType_ENUM      ResourceActionType = "ENUM"
	ResourceActionType_STRUCT    ResourceActionType = "STRUCT"
)

type ResourceAuditData added in v1.2.36

type ResourceAuditData struct {
	CreatedBy *string    `json:"createdBy,omitempty"`
	UpdatedBy *string    `json:"updatedBy,omitempty"`
	CreatedOn *time.Time `json:"createdOn,omitempty"`
	UpdatedOn *time.Time `json:"updatedOn,omitempty"`
}

func (*ResourceAuditData) GetCreatedBy added in v1.2.36

func (s *ResourceAuditData) GetCreatedBy() *string

func (*ResourceAuditData) GetCreatedOn added in v1.2.36

func (s *ResourceAuditData) GetCreatedOn() *time.Time

func (*ResourceAuditData) GetUpdatedBy added in v1.2.36

func (s *ResourceAuditData) GetUpdatedBy() *string

func (*ResourceAuditData) GetUpdatedOn added in v1.2.36

func (s *ResourceAuditData) GetUpdatedOn() *time.Time

type ResourceAuditDataMapper added in v1.2.36

type ResourceAuditDataMapper struct {
}

func NewResourceAuditDataMapper added in v1.2.36

func NewResourceAuditDataMapper() *ResourceAuditDataMapper

func (*ResourceAuditDataMapper) FromProperties added in v1.2.36

func (m *ResourceAuditDataMapper) FromProperties(properties map[string]*structpb.Value) *ResourceAuditData

func (*ResourceAuditDataMapper) New added in v1.2.36

func (*ResourceAuditDataMapper) ResourceIdentity added in v1.2.36

func (m *ResourceAuditDataMapper) ResourceIdentity() abs.ResourceIdentity

func (*ResourceAuditDataMapper) ToProperties added in v1.2.36

func (m *ResourceAuditDataMapper) ToProperties(resourceAuditData *ResourceAuditData) map[string]*structpb.Value

type ResourceIndex

type ResourceIndex struct {
	Properties  []ResourceIndexProperty `json:"properties,omitempty"`
	IndexType   *ResourceIndexType      `json:"indexType,omitempty"`
	Unique      *bool                   `json:"unique,omitempty"`
	Annotations map[string]string       `json:"annotations,omitempty"`
}

func (*ResourceIndex) GetAnnotations

func (s *ResourceIndex) GetAnnotations() map[string]string

func (*ResourceIndex) GetIndexType

func (s *ResourceIndex) GetIndexType() *ResourceIndexType

func (*ResourceIndex) GetProperties

func (s *ResourceIndex) GetProperties() []ResourceIndexProperty

func (*ResourceIndex) GetUnique

func (s *ResourceIndex) GetUnique() *bool

type ResourceIndexMapper

type ResourceIndexMapper struct {
}

func NewResourceIndexMapper

func NewResourceIndexMapper() *ResourceIndexMapper

func (*ResourceIndexMapper) FromProperties

func (m *ResourceIndexMapper) FromProperties(properties map[string]*structpb.Value) *ResourceIndex

func (*ResourceIndexMapper) New

func (*ResourceIndexMapper) ResourceIdentity

func (m *ResourceIndexMapper) ResourceIdentity() abs.ResourceIdentity

func (*ResourceIndexMapper) ToProperties

func (m *ResourceIndexMapper) ToProperties(resourceIndex *ResourceIndex) map[string]*structpb.Value

type ResourceIndexProperty

type ResourceIndexProperty struct {
	Name  string         `json:"name,omitempty"`
	Order *ResourceOrder `json:"order,omitempty"`
}

func (*ResourceIndexProperty) GetName

func (s *ResourceIndexProperty) GetName() string

func (*ResourceIndexProperty) GetOrder

func (s *ResourceIndexProperty) GetOrder() *ResourceOrder

type ResourceIndexPropertyMapper

type ResourceIndexPropertyMapper struct {
}

func NewResourceIndexPropertyMapper

func NewResourceIndexPropertyMapper() *ResourceIndexPropertyMapper

func (*ResourceIndexPropertyMapper) FromProperties

func (m *ResourceIndexPropertyMapper) FromProperties(properties map[string]*structpb.Value) *ResourceIndexProperty

func (*ResourceIndexPropertyMapper) New

func (*ResourceIndexPropertyMapper) ResourceIdentity

func (m *ResourceIndexPropertyMapper) ResourceIdentity() abs.ResourceIdentity

func (*ResourceIndexPropertyMapper) ToProperties

func (m *ResourceIndexPropertyMapper) ToProperties(resourceIndexProperty *ResourceIndexProperty) map[string]*structpb.Value

type ResourceIndexType

type ResourceIndexType string
const (
	ResourceIndexType_BTREE ResourceIndexType = "BTREE"
	ResourceIndexType_HASH  ResourceIndexType = "HASH"
)

type ResourceMapper

type ResourceMapper struct {
}

func NewResourceMapper

func NewResourceMapper() *ResourceMapper

func (*ResourceMapper) FromProperties

func (m *ResourceMapper) FromProperties(properties map[string]*structpb.Value) *Resource

func (*ResourceMapper) FromRecord

func (m *ResourceMapper) FromRecord(record *model.Record) *Resource

func (*ResourceMapper) New

func (m *ResourceMapper) New() *Resource

func (*ResourceMapper) ResourceIdentity

func (m *ResourceMapper) ResourceIdentity() abs.ResourceIdentity

func (*ResourceMapper) ToProperties

func (m *ResourceMapper) ToProperties(resource *Resource) map[string]*structpb.Value

func (*ResourceMapper) ToRecord

func (m *ResourceMapper) ToRecord(resource *Resource) *model.Record

type ResourceOrder

type ResourceOrder string
const (
	ResourceOrder_UNKNOWN ResourceOrder = "UNKNOWN"
	ResourceOrder_ASC     ResourceOrder = "ASC"
	ResourceOrder_DESC    ResourceOrder = "DESC"
)

type ResourceType

type ResourceType string
const (
	ResourceType_BOOL      ResourceType = "BOOL"
	ResourceType_STRING    ResourceType = "STRING"
	ResourceType_FLOAT32   ResourceType = "FLOAT32"
	ResourceType_FLOAT64   ResourceType = "FLOAT64"
	ResourceType_INT32     ResourceType = "INT32"
	ResourceType_INT64     ResourceType = "INT64"
	ResourceType_BYTES     ResourceType = "BYTES"
	ResourceType_UUID      ResourceType = "UUID"
	ResourceType_DATE      ResourceType = "DATE"
	ResourceType_TIME      ResourceType = "TIME"
	ResourceType_TIMESTAMP ResourceType = "TIMESTAMP"
	ResourceType_OBJECT    ResourceType = "OBJECT"
	ResourceType_MAP       ResourceType = "MAP"
	ResourceType_LIST      ResourceType = "LIST"
	ResourceType_REFERENCE ResourceType = "REFERENCE"
	ResourceType_ENUM      ResourceType = "ENUM"
	ResourceType_STRUCT    ResourceType = "STRUCT"
)

type Role

type Role struct {
	Id          *uuid.UUID     `json:"id,omitempty"`
	Version     int32          `json:"version,omitempty"`
	AuditData   *RoleAuditData `json:"auditData,omitempty"`
	Name        string         `json:"name,omitempty"`
	Permissions []*Permission  `json:"permissions,omitempty"`
	Details     interface{}    `json:"details,omitempty"`
}

func (*Role) GetAuditData added in v1.2.36

func (s *Role) GetAuditData() *RoleAuditData

func (*Role) GetDetails

func (s *Role) GetDetails() interface{}

func (*Role) GetId

func (s *Role) GetId() *uuid.UUID

func (*Role) GetName

func (s *Role) GetName() string

func (*Role) GetPermissions added in v1.1.44

func (s *Role) GetPermissions() []*Permission

func (*Role) GetVersion

func (s *Role) GetVersion() int32

type RoleAuditData added in v1.2.36

type RoleAuditData struct {
	CreatedBy *string    `json:"createdBy,omitempty"`
	UpdatedBy *string    `json:"updatedBy,omitempty"`
	CreatedOn *time.Time `json:"createdOn,omitempty"`
	UpdatedOn *time.Time `json:"updatedOn,omitempty"`
}

func (*RoleAuditData) GetCreatedBy added in v1.2.36

func (s *RoleAuditData) GetCreatedBy() *string

func (*RoleAuditData) GetCreatedOn added in v1.2.36

func (s *RoleAuditData) GetCreatedOn() *time.Time

func (*RoleAuditData) GetUpdatedBy added in v1.2.36

func (s *RoleAuditData) GetUpdatedBy() *string

func (*RoleAuditData) GetUpdatedOn added in v1.2.36

func (s *RoleAuditData) GetUpdatedOn() *time.Time

type RoleAuditDataMapper added in v1.2.36

type RoleAuditDataMapper struct {
}

func NewRoleAuditDataMapper added in v1.2.36

func NewRoleAuditDataMapper() *RoleAuditDataMapper

func (*RoleAuditDataMapper) FromProperties added in v1.2.36

func (m *RoleAuditDataMapper) FromProperties(properties map[string]*structpb.Value) *RoleAuditData

func (*RoleAuditDataMapper) New added in v1.2.36

func (*RoleAuditDataMapper) ResourceIdentity added in v1.2.36

func (m *RoleAuditDataMapper) ResourceIdentity() abs.ResourceIdentity

func (*RoleAuditDataMapper) ToProperties added in v1.2.36

func (m *RoleAuditDataMapper) ToProperties(roleAuditData *RoleAuditData) map[string]*structpb.Value

type RoleMapper

type RoleMapper struct {
}

func NewRoleMapper

func NewRoleMapper() *RoleMapper

func (*RoleMapper) FromProperties

func (m *RoleMapper) FromProperties(properties map[string]*structpb.Value) *Role

func (*RoleMapper) FromRecord

func (m *RoleMapper) FromRecord(record *model.Record) *Role

func (*RoleMapper) New

func (m *RoleMapper) New() *Role

func (*RoleMapper) ResourceIdentity

func (m *RoleMapper) ResourceIdentity() abs.ResourceIdentity

func (*RoleMapper) ToProperties

func (m *RoleMapper) ToProperties(role *Role) map[string]*structpb.Value

func (*RoleMapper) ToRecord

func (m *RoleMapper) ToRecord(role *Role) *model.Record

type SubType added in v1.2.21

type SubType struct {
	Name        string              `json:"name,omitempty"`
	Title       *string             `json:"title,omitempty"`
	Description *string             `json:"description,omitempty"`
	Properties  map[string]Property `json:"properties,omitempty"`
}

func (*SubType) GetDescription added in v1.2.21

func (s *SubType) GetDescription() *string

func (*SubType) GetName added in v1.2.21

func (s *SubType) GetName() string

func (*SubType) GetProperties added in v1.2.21

func (s *SubType) GetProperties() map[string]Property

func (*SubType) GetTitle added in v1.2.21

func (s *SubType) GetTitle() *string

type SubTypeMapper added in v1.2.21

type SubTypeMapper struct {
}

func NewSubTypeMapper added in v1.2.21

func NewSubTypeMapper() *SubTypeMapper

func (*SubTypeMapper) FromProperties added in v1.2.21

func (m *SubTypeMapper) FromProperties(properties map[string]*structpb.Value) *SubType

func (*SubTypeMapper) New added in v1.2.21

func (m *SubTypeMapper) New() *SubType

func (*SubTypeMapper) ResourceIdentity added in v1.2.21

func (m *SubTypeMapper) ResourceIdentity() abs.ResourceIdentity

func (*SubTypeMapper) ToProperties added in v1.2.21

func (m *SubTypeMapper) ToProperties(subType *SubType) map[string]*structpb.Value

type User

type User struct {
	Id          *uuid.UUID     `json:"id,omitempty"`
	Version     int32          `json:"version,omitempty"`
	AuditData   *UserAuditData `json:"auditData,omitempty"`
	Username    string         `json:"username,omitempty"`
	Password    *string        `json:"password,omitempty"`
	Roles       []*Role        `json:"roles,omitempty"`
	Permissions []*Permission  `json:"permissions,omitempty"`
	Details     interface{}    `json:"details,omitempty"`
}

func (*User) GetAuditData added in v1.2.36

func (s *User) GetAuditData() *UserAuditData

func (*User) GetDetails

func (s *User) GetDetails() interface{}

func (*User) GetId

func (s *User) GetId() *uuid.UUID

func (*User) GetPassword

func (s *User) GetPassword() *string

func (*User) GetPermissions added in v1.1.44

func (s *User) GetPermissions() []*Permission

func (*User) GetRoles

func (s *User) GetRoles() []*Role

func (*User) GetUsername

func (s *User) GetUsername() string

func (*User) GetVersion

func (s *User) GetVersion() int32

type UserAuditData added in v1.2.36

type UserAuditData struct {
	CreatedBy *string    `json:"createdBy,omitempty"`
	UpdatedBy *string    `json:"updatedBy,omitempty"`
	CreatedOn *time.Time `json:"createdOn,omitempty"`
	UpdatedOn *time.Time `json:"updatedOn,omitempty"`
}

func (*UserAuditData) GetCreatedBy added in v1.2.36

func (s *UserAuditData) GetCreatedBy() *string

func (*UserAuditData) GetCreatedOn added in v1.2.36

func (s *UserAuditData) GetCreatedOn() *time.Time

func (*UserAuditData) GetUpdatedBy added in v1.2.36

func (s *UserAuditData) GetUpdatedBy() *string

func (*UserAuditData) GetUpdatedOn added in v1.2.36

func (s *UserAuditData) GetUpdatedOn() *time.Time

type UserAuditDataMapper added in v1.2.36

type UserAuditDataMapper struct {
}

func NewUserAuditDataMapper added in v1.2.36

func NewUserAuditDataMapper() *UserAuditDataMapper

func (*UserAuditDataMapper) FromProperties added in v1.2.36

func (m *UserAuditDataMapper) FromProperties(properties map[string]*structpb.Value) *UserAuditData

func (*UserAuditDataMapper) New added in v1.2.36

func (*UserAuditDataMapper) ResourceIdentity added in v1.2.36

func (m *UserAuditDataMapper) ResourceIdentity() abs.ResourceIdentity

func (*UserAuditDataMapper) ToProperties added in v1.2.36

func (m *UserAuditDataMapper) ToProperties(userAuditData *UserAuditData) map[string]*structpb.Value

type UserMapper

type UserMapper struct {
}

func NewUserMapper

func NewUserMapper() *UserMapper

func (*UserMapper) FromProperties

func (m *UserMapper) FromProperties(properties map[string]*structpb.Value) *User

func (*UserMapper) FromRecord

func (m *UserMapper) FromRecord(record *model.Record) *User

func (*UserMapper) New

func (m *UserMapper) New() *User

func (*UserMapper) ResourceIdentity

func (m *UserMapper) ResourceIdentity() abs.ResourceIdentity

func (*UserMapper) ToProperties

func (m *UserMapper) ToProperties(user *User) map[string]*structpb.Value

func (*UserMapper) ToRecord

func (m *UserMapper) ToRecord(user *User) *model.Record

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL