3
0

Add ability to create events with imutable args

This commit is contained in:
Denis Arh
2020-02-25 06:47:03 +01:00
parent 7ce5a13bca
commit 9e14b50bce
19 changed files with 2032 additions and 102 deletions
+31
View File
@@ -26,6 +26,7 @@ type (
//
// This type is auto-generated.
{{ camelCase $.ResourceIdent "base" }} struct {
immutable bool
{{- range $p := $.Events.Properties }}
{{ $p.Name }} {{ $p.Type }}
{{- end }}
@@ -72,6 +73,31 @@ func {{ camelCase "" $.ResourceIdent $event }}(
) *{{ camelCase $.ResourceIdent $event }} {
return &{{ camelCase $.ResourceIdent $event }}{
{{ camelCase $.ResourceIdent "base" }}: &{{ camelCase $.ResourceIdent "base" }}{
immutable: false,
{{- range $p := $.Events.Properties }}
{{- if not $p.Internal }}
{{ $p.Name }}: {{ camelCase "arg" $p.Name }},
{{- end -}}
{{- end}}
},
}
}
// {{ camelCase "" $.ResourceIdent $event "Immutable" }} creates {{ $event }} for {{ $.ResourceString }} resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func {{ camelCase "" $.ResourceIdent $event "Immutable" }}(
{{- range $p := $.Events.Properties }}
{{- if not $p.Internal }}
{{ camelCase "arg" $p.Name }} {{ $p.Type }},
{{- end -}}
{{- end}}
) *{{ camelCase $.ResourceIdent $event }} {
return &{{ camelCase $.ResourceIdent $event }}{
{{ camelCase $.ResourceIdent "base" }}: &{{ camelCase $.ResourceIdent "base" }}{
immutable: true,
{{- range $p := $.Events.Properties }}
{{- if not $p.Internal }}
{{ $p.Name }}: {{ camelCase "arg" $p.Name }},
@@ -119,6 +145,11 @@ func (res {{ camelCase .ResourceIdent "base" }}) Encode() (args map[string][]byt
// Decode return values from Corredor script into struct props
func (res *{{ camelCase .ResourceIdent "base" }}) Decode(results map[string][]byte)( err error) {
if res.immutable {
// Respect immutability
return
}
{{- if $.Events.Result }}
if r, ok := results["result"]; ok && len(results) == 1 {
if err = json.Unmarshal(r, res.{{ $.Events.Result }}); err != nil {
+54 -4
View File
@@ -20,7 +20,8 @@ type (
//
// This type is auto-generated.
composeBase struct {
invoker auth.Identifiable
immutable bool
invoker auth.Identifiable
}
// composeOnManual
@@ -78,7 +79,22 @@ func (composeOnTimestamp) EventType() string {
// This function is auto-generated.
func ComposeOnManual() *composeOnManual {
return &composeOnManual{
composeBase: &composeBase{},
composeBase: &composeBase{
immutable: false,
},
}
}
// ComposeOnManualImmutable creates onManual for compose resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func ComposeOnManualImmutable() *composeOnManual {
return &composeOnManual{
composeBase: &composeBase{
immutable: true,
},
}
}
@@ -87,7 +103,22 @@ func ComposeOnManual() *composeOnManual {
// This function is auto-generated.
func ComposeOnInterval() *composeOnInterval {
return &composeOnInterval{
composeBase: &composeBase{},
composeBase: &composeBase{
immutable: false,
},
}
}
// ComposeOnIntervalImmutable creates onInterval for compose resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func ComposeOnIntervalImmutable() *composeOnInterval {
return &composeOnInterval{
composeBase: &composeBase{
immutable: true,
},
}
}
@@ -96,7 +127,22 @@ func ComposeOnInterval() *composeOnInterval {
// This function is auto-generated.
func ComposeOnTimestamp() *composeOnTimestamp {
return &composeOnTimestamp{
composeBase: &composeBase{},
composeBase: &composeBase{
immutable: false,
},
}
}
// ComposeOnTimestampImmutable creates onTimestamp for compose resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func ComposeOnTimestampImmutable() *composeOnTimestamp {
return &composeOnTimestamp{
composeBase: &composeBase{
immutable: true,
},
}
}
@@ -127,6 +173,10 @@ func (res composeBase) Encode() (args map[string][]byte, err error) {
// Decode return values from Corredor script into struct props
func (res *composeBase) Decode(results map[string][]byte) (err error) {
if res.immutable {
// Respect immutability
return
}
if r, ok := results["invoker"]; ok && len(results) == 1 {
if err = json.Unmarshal(r, res.invoker); err != nil {
return
+152
View File
@@ -22,6 +22,7 @@ type (
//
// This type is auto-generated.
moduleBase struct {
immutable bool
module *types.Module
oldModule *types.Module
namespace *types.Namespace
@@ -144,6 +145,27 @@ func ModuleOnManual(
) *moduleOnManual {
return &moduleOnManual{
moduleBase: &moduleBase{
immutable: false,
module: argModule,
oldModule: argOldModule,
namespace: argNamespace,
},
}
}
// ModuleOnManualImmutable creates onManual for compose:module resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func ModuleOnManualImmutable(
argModule *types.Module,
argOldModule *types.Module,
argNamespace *types.Namespace,
) *moduleOnManual {
return &moduleOnManual{
moduleBase: &moduleBase{
immutable: true,
module: argModule,
oldModule: argOldModule,
namespace: argNamespace,
@@ -161,6 +183,27 @@ func ModuleBeforeCreate(
) *moduleBeforeCreate {
return &moduleBeforeCreate{
moduleBase: &moduleBase{
immutable: false,
module: argModule,
oldModule: argOldModule,
namespace: argNamespace,
},
}
}
// ModuleBeforeCreateImmutable creates beforeCreate for compose:module resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func ModuleBeforeCreateImmutable(
argModule *types.Module,
argOldModule *types.Module,
argNamespace *types.Namespace,
) *moduleBeforeCreate {
return &moduleBeforeCreate{
moduleBase: &moduleBase{
immutable: true,
module: argModule,
oldModule: argOldModule,
namespace: argNamespace,
@@ -178,6 +221,27 @@ func ModuleBeforeUpdate(
) *moduleBeforeUpdate {
return &moduleBeforeUpdate{
moduleBase: &moduleBase{
immutable: false,
module: argModule,
oldModule: argOldModule,
namespace: argNamespace,
},
}
}
// ModuleBeforeUpdateImmutable creates beforeUpdate for compose:module resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func ModuleBeforeUpdateImmutable(
argModule *types.Module,
argOldModule *types.Module,
argNamespace *types.Namespace,
) *moduleBeforeUpdate {
return &moduleBeforeUpdate{
moduleBase: &moduleBase{
immutable: true,
module: argModule,
oldModule: argOldModule,
namespace: argNamespace,
@@ -195,6 +259,27 @@ func ModuleBeforeDelete(
) *moduleBeforeDelete {
return &moduleBeforeDelete{
moduleBase: &moduleBase{
immutable: false,
module: argModule,
oldModule: argOldModule,
namespace: argNamespace,
},
}
}
// ModuleBeforeDeleteImmutable creates beforeDelete for compose:module resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func ModuleBeforeDeleteImmutable(
argModule *types.Module,
argOldModule *types.Module,
argNamespace *types.Namespace,
) *moduleBeforeDelete {
return &moduleBeforeDelete{
moduleBase: &moduleBase{
immutable: true,
module: argModule,
oldModule: argOldModule,
namespace: argNamespace,
@@ -212,6 +297,27 @@ func ModuleAfterCreate(
) *moduleAfterCreate {
return &moduleAfterCreate{
moduleBase: &moduleBase{
immutable: false,
module: argModule,
oldModule: argOldModule,
namespace: argNamespace,
},
}
}
// ModuleAfterCreateImmutable creates afterCreate for compose:module resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func ModuleAfterCreateImmutable(
argModule *types.Module,
argOldModule *types.Module,
argNamespace *types.Namespace,
) *moduleAfterCreate {
return &moduleAfterCreate{
moduleBase: &moduleBase{
immutable: true,
module: argModule,
oldModule: argOldModule,
namespace: argNamespace,
@@ -229,6 +335,27 @@ func ModuleAfterUpdate(
) *moduleAfterUpdate {
return &moduleAfterUpdate{
moduleBase: &moduleBase{
immutable: false,
module: argModule,
oldModule: argOldModule,
namespace: argNamespace,
},
}
}
// ModuleAfterUpdateImmutable creates afterUpdate for compose:module resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func ModuleAfterUpdateImmutable(
argModule *types.Module,
argOldModule *types.Module,
argNamespace *types.Namespace,
) *moduleAfterUpdate {
return &moduleAfterUpdate{
moduleBase: &moduleBase{
immutable: true,
module: argModule,
oldModule: argOldModule,
namespace: argNamespace,
@@ -246,6 +373,27 @@ func ModuleAfterDelete(
) *moduleAfterDelete {
return &moduleAfterDelete{
moduleBase: &moduleBase{
immutable: false,
module: argModule,
oldModule: argOldModule,
namespace: argNamespace,
},
}
}
// ModuleAfterDeleteImmutable creates afterDelete for compose:module resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func ModuleAfterDeleteImmutable(
argModule *types.Module,
argOldModule *types.Module,
argNamespace *types.Namespace,
) *moduleAfterDelete {
return &moduleAfterDelete{
moduleBase: &moduleBase{
immutable: true,
module: argModule,
oldModule: argOldModule,
namespace: argNamespace,
@@ -320,6 +468,10 @@ func (res moduleBase) Encode() (args map[string][]byte, err error) {
// Decode return values from Corredor script into struct props
func (res *moduleBase) Decode(results map[string][]byte) (err error) {
if res.immutable {
// Respect immutability
return
}
if r, ok := results["result"]; ok && len(results) == 1 {
if err = json.Unmarshal(r, res.module); err != nil {
return
+138
View File
@@ -22,6 +22,7 @@ type (
//
// This type is auto-generated.
namespaceBase struct {
immutable bool
namespace *types.Namespace
oldNamespace *types.Namespace
invoker auth.Identifiable
@@ -142,6 +143,25 @@ func NamespaceOnManual(
) *namespaceOnManual {
return &namespaceOnManual{
namespaceBase: &namespaceBase{
immutable: false,
namespace: argNamespace,
oldNamespace: argOldNamespace,
},
}
}
// NamespaceOnManualImmutable creates onManual for compose:namespace resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func NamespaceOnManualImmutable(
argNamespace *types.Namespace,
argOldNamespace *types.Namespace,
) *namespaceOnManual {
return &namespaceOnManual{
namespaceBase: &namespaceBase{
immutable: true,
namespace: argNamespace,
oldNamespace: argOldNamespace,
},
@@ -157,6 +177,25 @@ func NamespaceBeforeCreate(
) *namespaceBeforeCreate {
return &namespaceBeforeCreate{
namespaceBase: &namespaceBase{
immutable: false,
namespace: argNamespace,
oldNamespace: argOldNamespace,
},
}
}
// NamespaceBeforeCreateImmutable creates beforeCreate for compose:namespace resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func NamespaceBeforeCreateImmutable(
argNamespace *types.Namespace,
argOldNamespace *types.Namespace,
) *namespaceBeforeCreate {
return &namespaceBeforeCreate{
namespaceBase: &namespaceBase{
immutable: true,
namespace: argNamespace,
oldNamespace: argOldNamespace,
},
@@ -172,6 +211,25 @@ func NamespaceBeforeUpdate(
) *namespaceBeforeUpdate {
return &namespaceBeforeUpdate{
namespaceBase: &namespaceBase{
immutable: false,
namespace: argNamespace,
oldNamespace: argOldNamespace,
},
}
}
// NamespaceBeforeUpdateImmutable creates beforeUpdate for compose:namespace resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func NamespaceBeforeUpdateImmutable(
argNamespace *types.Namespace,
argOldNamespace *types.Namespace,
) *namespaceBeforeUpdate {
return &namespaceBeforeUpdate{
namespaceBase: &namespaceBase{
immutable: true,
namespace: argNamespace,
oldNamespace: argOldNamespace,
},
@@ -187,6 +245,25 @@ func NamespaceBeforeDelete(
) *namespaceBeforeDelete {
return &namespaceBeforeDelete{
namespaceBase: &namespaceBase{
immutable: false,
namespace: argNamespace,
oldNamespace: argOldNamespace,
},
}
}
// NamespaceBeforeDeleteImmutable creates beforeDelete for compose:namespace resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func NamespaceBeforeDeleteImmutable(
argNamespace *types.Namespace,
argOldNamespace *types.Namespace,
) *namespaceBeforeDelete {
return &namespaceBeforeDelete{
namespaceBase: &namespaceBase{
immutable: true,
namespace: argNamespace,
oldNamespace: argOldNamespace,
},
@@ -202,6 +279,25 @@ func NamespaceAfterCreate(
) *namespaceAfterCreate {
return &namespaceAfterCreate{
namespaceBase: &namespaceBase{
immutable: false,
namespace: argNamespace,
oldNamespace: argOldNamespace,
},
}
}
// NamespaceAfterCreateImmutable creates afterCreate for compose:namespace resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func NamespaceAfterCreateImmutable(
argNamespace *types.Namespace,
argOldNamespace *types.Namespace,
) *namespaceAfterCreate {
return &namespaceAfterCreate{
namespaceBase: &namespaceBase{
immutable: true,
namespace: argNamespace,
oldNamespace: argOldNamespace,
},
@@ -217,6 +313,25 @@ func NamespaceAfterUpdate(
) *namespaceAfterUpdate {
return &namespaceAfterUpdate{
namespaceBase: &namespaceBase{
immutable: false,
namespace: argNamespace,
oldNamespace: argOldNamespace,
},
}
}
// NamespaceAfterUpdateImmutable creates afterUpdate for compose:namespace resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func NamespaceAfterUpdateImmutable(
argNamespace *types.Namespace,
argOldNamespace *types.Namespace,
) *namespaceAfterUpdate {
return &namespaceAfterUpdate{
namespaceBase: &namespaceBase{
immutable: true,
namespace: argNamespace,
oldNamespace: argOldNamespace,
},
@@ -232,6 +347,25 @@ func NamespaceAfterDelete(
) *namespaceAfterDelete {
return &namespaceAfterDelete{
namespaceBase: &namespaceBase{
immutable: false,
namespace: argNamespace,
oldNamespace: argOldNamespace,
},
}
}
// NamespaceAfterDeleteImmutable creates afterDelete for compose:namespace resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func NamespaceAfterDeleteImmutable(
argNamespace *types.Namespace,
argOldNamespace *types.Namespace,
) *namespaceAfterDelete {
return &namespaceAfterDelete{
namespaceBase: &namespaceBase{
immutable: true,
namespace: argNamespace,
oldNamespace: argOldNamespace,
},
@@ -294,6 +428,10 @@ func (res namespaceBase) Encode() (args map[string][]byte, err error) {
// Decode return values from Corredor script into struct props
func (res *namespaceBase) Decode(results map[string][]byte) (err error) {
if res.immutable {
// Respect immutability
return
}
if r, ok := results["result"]; ok && len(results) == 1 {
if err = json.Unmarshal(r, res.namespace); err != nil {
return
+152
View File
@@ -22,6 +22,7 @@ type (
//
// This type is auto-generated.
pageBase struct {
immutable bool
page *types.Page
oldPage *types.Page
namespace *types.Namespace
@@ -144,6 +145,27 @@ func PageOnManual(
) *pageOnManual {
return &pageOnManual{
pageBase: &pageBase{
immutable: false,
page: argPage,
oldPage: argOldPage,
namespace: argNamespace,
},
}
}
// PageOnManualImmutable creates onManual for compose:page resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func PageOnManualImmutable(
argPage *types.Page,
argOldPage *types.Page,
argNamespace *types.Namespace,
) *pageOnManual {
return &pageOnManual{
pageBase: &pageBase{
immutable: true,
page: argPage,
oldPage: argOldPage,
namespace: argNamespace,
@@ -161,6 +183,27 @@ func PageBeforeCreate(
) *pageBeforeCreate {
return &pageBeforeCreate{
pageBase: &pageBase{
immutable: false,
page: argPage,
oldPage: argOldPage,
namespace: argNamespace,
},
}
}
// PageBeforeCreateImmutable creates beforeCreate for compose:page resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func PageBeforeCreateImmutable(
argPage *types.Page,
argOldPage *types.Page,
argNamespace *types.Namespace,
) *pageBeforeCreate {
return &pageBeforeCreate{
pageBase: &pageBase{
immutable: true,
page: argPage,
oldPage: argOldPage,
namespace: argNamespace,
@@ -178,6 +221,27 @@ func PageBeforeUpdate(
) *pageBeforeUpdate {
return &pageBeforeUpdate{
pageBase: &pageBase{
immutable: false,
page: argPage,
oldPage: argOldPage,
namespace: argNamespace,
},
}
}
// PageBeforeUpdateImmutable creates beforeUpdate for compose:page resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func PageBeforeUpdateImmutable(
argPage *types.Page,
argOldPage *types.Page,
argNamespace *types.Namespace,
) *pageBeforeUpdate {
return &pageBeforeUpdate{
pageBase: &pageBase{
immutable: true,
page: argPage,
oldPage: argOldPage,
namespace: argNamespace,
@@ -195,6 +259,27 @@ func PageBeforeDelete(
) *pageBeforeDelete {
return &pageBeforeDelete{
pageBase: &pageBase{
immutable: false,
page: argPage,
oldPage: argOldPage,
namespace: argNamespace,
},
}
}
// PageBeforeDeleteImmutable creates beforeDelete for compose:page resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func PageBeforeDeleteImmutable(
argPage *types.Page,
argOldPage *types.Page,
argNamespace *types.Namespace,
) *pageBeforeDelete {
return &pageBeforeDelete{
pageBase: &pageBase{
immutable: true,
page: argPage,
oldPage: argOldPage,
namespace: argNamespace,
@@ -212,6 +297,27 @@ func PageAfterCreate(
) *pageAfterCreate {
return &pageAfterCreate{
pageBase: &pageBase{
immutable: false,
page: argPage,
oldPage: argOldPage,
namespace: argNamespace,
},
}
}
// PageAfterCreateImmutable creates afterCreate for compose:page resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func PageAfterCreateImmutable(
argPage *types.Page,
argOldPage *types.Page,
argNamespace *types.Namespace,
) *pageAfterCreate {
return &pageAfterCreate{
pageBase: &pageBase{
immutable: true,
page: argPage,
oldPage: argOldPage,
namespace: argNamespace,
@@ -229,6 +335,27 @@ func PageAfterUpdate(
) *pageAfterUpdate {
return &pageAfterUpdate{
pageBase: &pageBase{
immutable: false,
page: argPage,
oldPage: argOldPage,
namespace: argNamespace,
},
}
}
// PageAfterUpdateImmutable creates afterUpdate for compose:page resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func PageAfterUpdateImmutable(
argPage *types.Page,
argOldPage *types.Page,
argNamespace *types.Namespace,
) *pageAfterUpdate {
return &pageAfterUpdate{
pageBase: &pageBase{
immutable: true,
page: argPage,
oldPage: argOldPage,
namespace: argNamespace,
@@ -246,6 +373,27 @@ func PageAfterDelete(
) *pageAfterDelete {
return &pageAfterDelete{
pageBase: &pageBase{
immutable: false,
page: argPage,
oldPage: argOldPage,
namespace: argNamespace,
},
}
}
// PageAfterDeleteImmutable creates afterDelete for compose:page resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func PageAfterDeleteImmutable(
argPage *types.Page,
argOldPage *types.Page,
argNamespace *types.Namespace,
) *pageAfterDelete {
return &pageAfterDelete{
pageBase: &pageBase{
immutable: true,
page: argPage,
oldPage: argOldPage,
namespace: argNamespace,
@@ -320,6 +468,10 @@ func (res pageBase) Encode() (args map[string][]byte, err error) {
// Decode return values from Corredor script into struct props
func (res *pageBase) Decode(results map[string][]byte) (err error) {
if res.immutable {
// Respect immutability
return
}
if r, ok := results["result"]; ok && len(results) == 1 {
if err = json.Unmarshal(r, res.page); err != nil {
return
+180
View File
@@ -22,6 +22,7 @@ type (
//
// This type is auto-generated.
recordBase struct {
immutable bool
record *types.Record
oldRecord *types.Record
module *types.Module
@@ -148,6 +149,31 @@ func RecordOnManual(
) *recordOnManual {
return &recordOnManual{
recordBase: &recordBase{
immutable: false,
record: argRecord,
oldRecord: argOldRecord,
module: argModule,
namespace: argNamespace,
recordValueErrors: argRecordValueErrors,
},
}
}
// RecordOnManualImmutable creates onManual for compose:record resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func RecordOnManualImmutable(
argRecord *types.Record,
argOldRecord *types.Record,
argModule *types.Module,
argNamespace *types.Namespace,
argRecordValueErrors *types.RecordValueErrorSet,
) *recordOnManual {
return &recordOnManual{
recordBase: &recordBase{
immutable: true,
record: argRecord,
oldRecord: argOldRecord,
module: argModule,
@@ -169,6 +195,31 @@ func RecordBeforeCreate(
) *recordBeforeCreate {
return &recordBeforeCreate{
recordBase: &recordBase{
immutable: false,
record: argRecord,
oldRecord: argOldRecord,
module: argModule,
namespace: argNamespace,
recordValueErrors: argRecordValueErrors,
},
}
}
// RecordBeforeCreateImmutable creates beforeCreate for compose:record resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func RecordBeforeCreateImmutable(
argRecord *types.Record,
argOldRecord *types.Record,
argModule *types.Module,
argNamespace *types.Namespace,
argRecordValueErrors *types.RecordValueErrorSet,
) *recordBeforeCreate {
return &recordBeforeCreate{
recordBase: &recordBase{
immutable: true,
record: argRecord,
oldRecord: argOldRecord,
module: argModule,
@@ -190,6 +241,31 @@ func RecordBeforeUpdate(
) *recordBeforeUpdate {
return &recordBeforeUpdate{
recordBase: &recordBase{
immutable: false,
record: argRecord,
oldRecord: argOldRecord,
module: argModule,
namespace: argNamespace,
recordValueErrors: argRecordValueErrors,
},
}
}
// RecordBeforeUpdateImmutable creates beforeUpdate for compose:record resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func RecordBeforeUpdateImmutable(
argRecord *types.Record,
argOldRecord *types.Record,
argModule *types.Module,
argNamespace *types.Namespace,
argRecordValueErrors *types.RecordValueErrorSet,
) *recordBeforeUpdate {
return &recordBeforeUpdate{
recordBase: &recordBase{
immutable: true,
record: argRecord,
oldRecord: argOldRecord,
module: argModule,
@@ -211,6 +287,31 @@ func RecordBeforeDelete(
) *recordBeforeDelete {
return &recordBeforeDelete{
recordBase: &recordBase{
immutable: false,
record: argRecord,
oldRecord: argOldRecord,
module: argModule,
namespace: argNamespace,
recordValueErrors: argRecordValueErrors,
},
}
}
// RecordBeforeDeleteImmutable creates beforeDelete for compose:record resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func RecordBeforeDeleteImmutable(
argRecord *types.Record,
argOldRecord *types.Record,
argModule *types.Module,
argNamespace *types.Namespace,
argRecordValueErrors *types.RecordValueErrorSet,
) *recordBeforeDelete {
return &recordBeforeDelete{
recordBase: &recordBase{
immutable: true,
record: argRecord,
oldRecord: argOldRecord,
module: argModule,
@@ -232,6 +333,31 @@ func RecordAfterCreate(
) *recordAfterCreate {
return &recordAfterCreate{
recordBase: &recordBase{
immutable: false,
record: argRecord,
oldRecord: argOldRecord,
module: argModule,
namespace: argNamespace,
recordValueErrors: argRecordValueErrors,
},
}
}
// RecordAfterCreateImmutable creates afterCreate for compose:record resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func RecordAfterCreateImmutable(
argRecord *types.Record,
argOldRecord *types.Record,
argModule *types.Module,
argNamespace *types.Namespace,
argRecordValueErrors *types.RecordValueErrorSet,
) *recordAfterCreate {
return &recordAfterCreate{
recordBase: &recordBase{
immutable: true,
record: argRecord,
oldRecord: argOldRecord,
module: argModule,
@@ -253,6 +379,31 @@ func RecordAfterUpdate(
) *recordAfterUpdate {
return &recordAfterUpdate{
recordBase: &recordBase{
immutable: false,
record: argRecord,
oldRecord: argOldRecord,
module: argModule,
namespace: argNamespace,
recordValueErrors: argRecordValueErrors,
},
}
}
// RecordAfterUpdateImmutable creates afterUpdate for compose:record resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func RecordAfterUpdateImmutable(
argRecord *types.Record,
argOldRecord *types.Record,
argModule *types.Module,
argNamespace *types.Namespace,
argRecordValueErrors *types.RecordValueErrorSet,
) *recordAfterUpdate {
return &recordAfterUpdate{
recordBase: &recordBase{
immutable: true,
record: argRecord,
oldRecord: argOldRecord,
module: argModule,
@@ -274,6 +425,31 @@ func RecordAfterDelete(
) *recordAfterDelete {
return &recordAfterDelete{
recordBase: &recordBase{
immutable: false,
record: argRecord,
oldRecord: argOldRecord,
module: argModule,
namespace: argNamespace,
recordValueErrors: argRecordValueErrors,
},
}
}
// RecordAfterDeleteImmutable creates afterDelete for compose:record resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func RecordAfterDeleteImmutable(
argRecord *types.Record,
argOldRecord *types.Record,
argModule *types.Module,
argNamespace *types.Namespace,
argRecordValueErrors *types.RecordValueErrorSet,
) *recordAfterDelete {
return &recordAfterDelete{
recordBase: &recordBase{
immutable: true,
record: argRecord,
oldRecord: argOldRecord,
module: argModule,
@@ -379,6 +555,10 @@ func (res recordBase) Encode() (args map[string][]byte, err error) {
// Decode return values from Corredor script into struct props
func (res *recordBase) Decode(results map[string][]byte) (err error) {
if res.immutable {
// Respect immutability
return
}
if r, ok := results["result"]; ok && len(results) == 1 {
if err = json.Unmarshal(r, res.record); err != nil {
return
+138
View File
@@ -22,6 +22,7 @@ type (
//
// This type is auto-generated.
channelBase struct {
immutable bool
channel *types.Channel
oldChannel *types.Channel
invoker auth.Identifiable
@@ -142,6 +143,25 @@ func ChannelOnManual(
) *channelOnManual {
return &channelOnManual{
channelBase: &channelBase{
immutable: false,
channel: argChannel,
oldChannel: argOldChannel,
},
}
}
// ChannelOnManualImmutable creates onManual for messaging:channel resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func ChannelOnManualImmutable(
argChannel *types.Channel,
argOldChannel *types.Channel,
) *channelOnManual {
return &channelOnManual{
channelBase: &channelBase{
immutable: true,
channel: argChannel,
oldChannel: argOldChannel,
},
@@ -157,6 +177,25 @@ func ChannelBeforeCreate(
) *channelBeforeCreate {
return &channelBeforeCreate{
channelBase: &channelBase{
immutable: false,
channel: argChannel,
oldChannel: argOldChannel,
},
}
}
// ChannelBeforeCreateImmutable creates beforeCreate for messaging:channel resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func ChannelBeforeCreateImmutable(
argChannel *types.Channel,
argOldChannel *types.Channel,
) *channelBeforeCreate {
return &channelBeforeCreate{
channelBase: &channelBase{
immutable: true,
channel: argChannel,
oldChannel: argOldChannel,
},
@@ -172,6 +211,25 @@ func ChannelBeforeUpdate(
) *channelBeforeUpdate {
return &channelBeforeUpdate{
channelBase: &channelBase{
immutable: false,
channel: argChannel,
oldChannel: argOldChannel,
},
}
}
// ChannelBeforeUpdateImmutable creates beforeUpdate for messaging:channel resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func ChannelBeforeUpdateImmutable(
argChannel *types.Channel,
argOldChannel *types.Channel,
) *channelBeforeUpdate {
return &channelBeforeUpdate{
channelBase: &channelBase{
immutable: true,
channel: argChannel,
oldChannel: argOldChannel,
},
@@ -187,6 +245,25 @@ func ChannelBeforeDelete(
) *channelBeforeDelete {
return &channelBeforeDelete{
channelBase: &channelBase{
immutable: false,
channel: argChannel,
oldChannel: argOldChannel,
},
}
}
// ChannelBeforeDeleteImmutable creates beforeDelete for messaging:channel resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func ChannelBeforeDeleteImmutable(
argChannel *types.Channel,
argOldChannel *types.Channel,
) *channelBeforeDelete {
return &channelBeforeDelete{
channelBase: &channelBase{
immutable: true,
channel: argChannel,
oldChannel: argOldChannel,
},
@@ -202,6 +279,25 @@ func ChannelAfterCreate(
) *channelAfterCreate {
return &channelAfterCreate{
channelBase: &channelBase{
immutable: false,
channel: argChannel,
oldChannel: argOldChannel,
},
}
}
// ChannelAfterCreateImmutable creates afterCreate for messaging:channel resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func ChannelAfterCreateImmutable(
argChannel *types.Channel,
argOldChannel *types.Channel,
) *channelAfterCreate {
return &channelAfterCreate{
channelBase: &channelBase{
immutable: true,
channel: argChannel,
oldChannel: argOldChannel,
},
@@ -217,6 +313,25 @@ func ChannelAfterUpdate(
) *channelAfterUpdate {
return &channelAfterUpdate{
channelBase: &channelBase{
immutable: false,
channel: argChannel,
oldChannel: argOldChannel,
},
}
}
// ChannelAfterUpdateImmutable creates afterUpdate for messaging:channel resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func ChannelAfterUpdateImmutable(
argChannel *types.Channel,
argOldChannel *types.Channel,
) *channelAfterUpdate {
return &channelAfterUpdate{
channelBase: &channelBase{
immutable: true,
channel: argChannel,
oldChannel: argOldChannel,
},
@@ -232,6 +347,25 @@ func ChannelAfterDelete(
) *channelAfterDelete {
return &channelAfterDelete{
channelBase: &channelBase{
immutable: false,
channel: argChannel,
oldChannel: argOldChannel,
},
}
}
// ChannelAfterDeleteImmutable creates afterDelete for messaging:channel resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func ChannelAfterDeleteImmutable(
argChannel *types.Channel,
argOldChannel *types.Channel,
) *channelAfterDelete {
return &channelAfterDelete{
channelBase: &channelBase{
immutable: true,
channel: argChannel,
oldChannel: argOldChannel,
},
@@ -294,6 +428,10 @@ func (res channelBase) Encode() (args map[string][]byte, err error) {
// Decode return values from Corredor script into struct props
func (res *channelBase) Decode(results map[string][]byte) (err error) {
if res.immutable {
// Respect immutability
return
}
if r, ok := results["result"]; ok && len(results) == 1 {
if err = json.Unmarshal(r, res.channel); err != nil {
return
+176 -19
View File
@@ -22,9 +22,10 @@ type (
//
// This type is auto-generated.
channelMemberBase struct {
member *types.ChannelMember
channel *types.Channel
invoker auth.Identifiable
immutable bool
member *types.ChannelMember
channel *types.Channel
invoker auth.Identifiable
}
// channelMemberBeforeJoin
@@ -156,8 +157,27 @@ func ChannelMemberBeforeJoin(
) *channelMemberBeforeJoin {
return &channelMemberBeforeJoin{
channelMemberBase: &channelMemberBase{
member: argMember,
channel: argChannel,
immutable: false,
member: argMember,
channel: argChannel,
},
}
}
// ChannelMemberBeforeJoinImmutable creates beforeJoin for messaging:channel:member resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func ChannelMemberBeforeJoinImmutable(
argMember *types.ChannelMember,
argChannel *types.Channel,
) *channelMemberBeforeJoin {
return &channelMemberBeforeJoin{
channelMemberBase: &channelMemberBase{
immutable: true,
member: argMember,
channel: argChannel,
},
}
}
@@ -171,8 +191,27 @@ func ChannelMemberBeforePart(
) *channelMemberBeforePart {
return &channelMemberBeforePart{
channelMemberBase: &channelMemberBase{
member: argMember,
channel: argChannel,
immutable: false,
member: argMember,
channel: argChannel,
},
}
}
// ChannelMemberBeforePartImmutable creates beforePart for messaging:channel:member resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func ChannelMemberBeforePartImmutable(
argMember *types.ChannelMember,
argChannel *types.Channel,
) *channelMemberBeforePart {
return &channelMemberBeforePart{
channelMemberBase: &channelMemberBase{
immutable: true,
member: argMember,
channel: argChannel,
},
}
}
@@ -186,8 +225,27 @@ func ChannelMemberBeforeAdd(
) *channelMemberBeforeAdd {
return &channelMemberBeforeAdd{
channelMemberBase: &channelMemberBase{
member: argMember,
channel: argChannel,
immutable: false,
member: argMember,
channel: argChannel,
},
}
}
// ChannelMemberBeforeAddImmutable creates beforeAdd for messaging:channel:member resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func ChannelMemberBeforeAddImmutable(
argMember *types.ChannelMember,
argChannel *types.Channel,
) *channelMemberBeforeAdd {
return &channelMemberBeforeAdd{
channelMemberBase: &channelMemberBase{
immutable: true,
member: argMember,
channel: argChannel,
},
}
}
@@ -201,8 +259,27 @@ func ChannelMemberBeforeRemove(
) *channelMemberBeforeRemove {
return &channelMemberBeforeRemove{
channelMemberBase: &channelMemberBase{
member: argMember,
channel: argChannel,
immutable: false,
member: argMember,
channel: argChannel,
},
}
}
// ChannelMemberBeforeRemoveImmutable creates beforeRemove for messaging:channel:member resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func ChannelMemberBeforeRemoveImmutable(
argMember *types.ChannelMember,
argChannel *types.Channel,
) *channelMemberBeforeRemove {
return &channelMemberBeforeRemove{
channelMemberBase: &channelMemberBase{
immutable: true,
member: argMember,
channel: argChannel,
},
}
}
@@ -216,8 +293,27 @@ func ChannelMemberAfterJoin(
) *channelMemberAfterJoin {
return &channelMemberAfterJoin{
channelMemberBase: &channelMemberBase{
member: argMember,
channel: argChannel,
immutable: false,
member: argMember,
channel: argChannel,
},
}
}
// ChannelMemberAfterJoinImmutable creates afterJoin for messaging:channel:member resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func ChannelMemberAfterJoinImmutable(
argMember *types.ChannelMember,
argChannel *types.Channel,
) *channelMemberAfterJoin {
return &channelMemberAfterJoin{
channelMemberBase: &channelMemberBase{
immutable: true,
member: argMember,
channel: argChannel,
},
}
}
@@ -231,8 +327,27 @@ func ChannelMemberAfterPart(
) *channelMemberAfterPart {
return &channelMemberAfterPart{
channelMemberBase: &channelMemberBase{
member: argMember,
channel: argChannel,
immutable: false,
member: argMember,
channel: argChannel,
},
}
}
// ChannelMemberAfterPartImmutable creates afterPart for messaging:channel:member resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func ChannelMemberAfterPartImmutable(
argMember *types.ChannelMember,
argChannel *types.Channel,
) *channelMemberAfterPart {
return &channelMemberAfterPart{
channelMemberBase: &channelMemberBase{
immutable: true,
member: argMember,
channel: argChannel,
},
}
}
@@ -246,8 +361,27 @@ func ChannelMemberAfterAdd(
) *channelMemberAfterAdd {
return &channelMemberAfterAdd{
channelMemberBase: &channelMemberBase{
member: argMember,
channel: argChannel,
immutable: false,
member: argMember,
channel: argChannel,
},
}
}
// ChannelMemberAfterAddImmutable creates afterAdd for messaging:channel:member resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func ChannelMemberAfterAddImmutable(
argMember *types.ChannelMember,
argChannel *types.Channel,
) *channelMemberAfterAdd {
return &channelMemberAfterAdd{
channelMemberBase: &channelMemberBase{
immutable: true,
member: argMember,
channel: argChannel,
},
}
}
@@ -261,8 +395,27 @@ func ChannelMemberAfterRemove(
) *channelMemberAfterRemove {
return &channelMemberAfterRemove{
channelMemberBase: &channelMemberBase{
member: argMember,
channel: argChannel,
immutable: false,
member: argMember,
channel: argChannel,
},
}
}
// ChannelMemberAfterRemoveImmutable creates afterRemove for messaging:channel:member resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func ChannelMemberAfterRemoveImmutable(
argMember *types.ChannelMember,
argChannel *types.Channel,
) *channelMemberAfterRemove {
return &channelMemberAfterRemove{
channelMemberBase: &channelMemberBase{
immutable: true,
member: argMember,
channel: argChannel,
},
}
}
@@ -330,6 +483,10 @@ func (res channelMemberBase) Encode() (args map[string][]byte, err error) {
// Decode return values from Corredor script into struct props
func (res *channelMemberBase) Decode(results map[string][]byte) (err error) {
if res.immutable {
// Respect immutability
return
}
if r, ok := results["result"]; ok && len(results) == 1 {
if err = json.Unmarshal(r, res.member); err != nil {
return
+29 -5
View File
@@ -22,9 +22,10 @@ type (
//
// This type is auto-generated.
commandBase struct {
command *types.Command
channel *types.Channel
invoker auth.Identifiable
immutable bool
command *types.Command
channel *types.Channel
invoker auth.Identifiable
}
// commandOnInvoke
@@ -58,8 +59,27 @@ func CommandOnInvoke(
) *commandOnInvoke {
return &commandOnInvoke{
commandBase: &commandBase{
command: argCommand,
channel: argChannel,
immutable: false,
command: argCommand,
channel: argChannel,
},
}
}
// CommandOnInvokeImmutable creates onInvoke for messaging:command resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func CommandOnInvokeImmutable(
argCommand *types.Command,
argChannel *types.Channel,
) *commandOnInvoke {
return &commandOnInvoke{
commandBase: &commandBase{
immutable: true,
command: argCommand,
channel: argChannel,
},
}
}
@@ -113,6 +133,10 @@ func (res commandBase) Encode() (args map[string][]byte, err error) {
// Decode return values from Corredor script into struct props
func (res *commandBase) Decode(results map[string][]byte) (err error) {
if res.immutable {
// Respect immutability
return
}
if r, ok := results["result"]; ok && len(results) == 1 {
if err = json.Unmarshal(r, res.command); err != nil {
return
+152
View File
@@ -22,6 +22,7 @@ type (
//
// This type is auto-generated.
messageBase struct {
immutable bool
message *types.Message
oldMessage *types.Message
channel *types.Channel
@@ -144,6 +145,27 @@ func MessageOnManual(
) *messageOnManual {
return &messageOnManual{
messageBase: &messageBase{
immutable: false,
message: argMessage,
oldMessage: argOldMessage,
channel: argChannel,
},
}
}
// MessageOnManualImmutable creates onManual for messaging:message resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func MessageOnManualImmutable(
argMessage *types.Message,
argOldMessage *types.Message,
argChannel *types.Channel,
) *messageOnManual {
return &messageOnManual{
messageBase: &messageBase{
immutable: true,
message: argMessage,
oldMessage: argOldMessage,
channel: argChannel,
@@ -161,6 +183,27 @@ func MessageBeforeCreate(
) *messageBeforeCreate {
return &messageBeforeCreate{
messageBase: &messageBase{
immutable: false,
message: argMessage,
oldMessage: argOldMessage,
channel: argChannel,
},
}
}
// MessageBeforeCreateImmutable creates beforeCreate for messaging:message resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func MessageBeforeCreateImmutable(
argMessage *types.Message,
argOldMessage *types.Message,
argChannel *types.Channel,
) *messageBeforeCreate {
return &messageBeforeCreate{
messageBase: &messageBase{
immutable: true,
message: argMessage,
oldMessage: argOldMessage,
channel: argChannel,
@@ -178,6 +221,27 @@ func MessageBeforeUpdate(
) *messageBeforeUpdate {
return &messageBeforeUpdate{
messageBase: &messageBase{
immutable: false,
message: argMessage,
oldMessage: argOldMessage,
channel: argChannel,
},
}
}
// MessageBeforeUpdateImmutable creates beforeUpdate for messaging:message resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func MessageBeforeUpdateImmutable(
argMessage *types.Message,
argOldMessage *types.Message,
argChannel *types.Channel,
) *messageBeforeUpdate {
return &messageBeforeUpdate{
messageBase: &messageBase{
immutable: true,
message: argMessage,
oldMessage: argOldMessage,
channel: argChannel,
@@ -195,6 +259,27 @@ func MessageBeforeDelete(
) *messageBeforeDelete {
return &messageBeforeDelete{
messageBase: &messageBase{
immutable: false,
message: argMessage,
oldMessage: argOldMessage,
channel: argChannel,
},
}
}
// MessageBeforeDeleteImmutable creates beforeDelete for messaging:message resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func MessageBeforeDeleteImmutable(
argMessage *types.Message,
argOldMessage *types.Message,
argChannel *types.Channel,
) *messageBeforeDelete {
return &messageBeforeDelete{
messageBase: &messageBase{
immutable: true,
message: argMessage,
oldMessage: argOldMessage,
channel: argChannel,
@@ -212,6 +297,27 @@ func MessageAfterCreate(
) *messageAfterCreate {
return &messageAfterCreate{
messageBase: &messageBase{
immutable: false,
message: argMessage,
oldMessage: argOldMessage,
channel: argChannel,
},
}
}
// MessageAfterCreateImmutable creates afterCreate for messaging:message resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func MessageAfterCreateImmutable(
argMessage *types.Message,
argOldMessage *types.Message,
argChannel *types.Channel,
) *messageAfterCreate {
return &messageAfterCreate{
messageBase: &messageBase{
immutable: true,
message: argMessage,
oldMessage: argOldMessage,
channel: argChannel,
@@ -229,6 +335,27 @@ func MessageAfterUpdate(
) *messageAfterUpdate {
return &messageAfterUpdate{
messageBase: &messageBase{
immutable: false,
message: argMessage,
oldMessage: argOldMessage,
channel: argChannel,
},
}
}
// MessageAfterUpdateImmutable creates afterUpdate for messaging:message resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func MessageAfterUpdateImmutable(
argMessage *types.Message,
argOldMessage *types.Message,
argChannel *types.Channel,
) *messageAfterUpdate {
return &messageAfterUpdate{
messageBase: &messageBase{
immutable: true,
message: argMessage,
oldMessage: argOldMessage,
channel: argChannel,
@@ -246,6 +373,27 @@ func MessageAfterDelete(
) *messageAfterDelete {
return &messageAfterDelete{
messageBase: &messageBase{
immutable: false,
message: argMessage,
oldMessage: argOldMessage,
channel: argChannel,
},
}
}
// MessageAfterDeleteImmutable creates afterDelete for messaging:message resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func MessageAfterDeleteImmutable(
argMessage *types.Message,
argOldMessage *types.Message,
argChannel *types.Channel,
) *messageAfterDelete {
return &messageAfterDelete{
messageBase: &messageBase{
immutable: true,
message: argMessage,
oldMessage: argOldMessage,
channel: argChannel,
@@ -327,6 +475,10 @@ func (res messageBase) Encode() (args map[string][]byte, err error) {
// Decode return values from Corredor script into struct props
func (res *messageBase) Decode(results map[string][]byte) (err error) {
if res.immutable {
// Respect immutability
return
}
if r, ok := results["result"]; ok && len(results) == 1 {
if err = json.Unmarshal(r, res.message); err != nil {
return
+54 -4
View File
@@ -20,7 +20,8 @@ type (
//
// This type is auto-generated.
messagingBase struct {
invoker auth.Identifiable
immutable bool
invoker auth.Identifiable
}
// messagingOnManual
@@ -78,7 +79,22 @@ func (messagingOnTimestamp) EventType() string {
// This function is auto-generated.
func MessagingOnManual() *messagingOnManual {
return &messagingOnManual{
messagingBase: &messagingBase{},
messagingBase: &messagingBase{
immutable: false,
},
}
}
// MessagingOnManualImmutable creates onManual for messaging resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func MessagingOnManualImmutable() *messagingOnManual {
return &messagingOnManual{
messagingBase: &messagingBase{
immutable: true,
},
}
}
@@ -87,7 +103,22 @@ func MessagingOnManual() *messagingOnManual {
// This function is auto-generated.
func MessagingOnInterval() *messagingOnInterval {
return &messagingOnInterval{
messagingBase: &messagingBase{},
messagingBase: &messagingBase{
immutable: false,
},
}
}
// MessagingOnIntervalImmutable creates onInterval for messaging resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func MessagingOnIntervalImmutable() *messagingOnInterval {
return &messagingOnInterval{
messagingBase: &messagingBase{
immutable: true,
},
}
}
@@ -96,7 +127,22 @@ func MessagingOnInterval() *messagingOnInterval {
// This function is auto-generated.
func MessagingOnTimestamp() *messagingOnTimestamp {
return &messagingOnTimestamp{
messagingBase: &messagingBase{},
messagingBase: &messagingBase{
immutable: false,
},
}
}
// MessagingOnTimestampImmutable creates onTimestamp for messaging resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func MessagingOnTimestampImmutable() *messagingOnTimestamp {
return &messagingOnTimestamp{
messagingBase: &messagingBase{
immutable: true,
},
}
}
@@ -127,6 +173,10 @@ func (res messagingBase) Encode() (args map[string][]byte, err error) {
// Decode return values from Corredor script into struct props
func (res *messagingBase) Decode(results map[string][]byte) (err error) {
if res.immutable {
// Respect immutability
return
}
if r, ok := results["invoker"]; ok && len(results) == 1 {
if err = json.Unmarshal(r, res.invoker); err != nil {
return
+138
View File
@@ -22,6 +22,7 @@ type (
//
// This type is auto-generated.
applicationBase struct {
immutable bool
application *types.Application
oldApplication *types.Application
invoker auth.Identifiable
@@ -142,6 +143,25 @@ func ApplicationOnManual(
) *applicationOnManual {
return &applicationOnManual{
applicationBase: &applicationBase{
immutable: false,
application: argApplication,
oldApplication: argOldApplication,
},
}
}
// ApplicationOnManualImmutable creates onManual for system:application resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func ApplicationOnManualImmutable(
argApplication *types.Application,
argOldApplication *types.Application,
) *applicationOnManual {
return &applicationOnManual{
applicationBase: &applicationBase{
immutable: true,
application: argApplication,
oldApplication: argOldApplication,
},
@@ -157,6 +177,25 @@ func ApplicationBeforeCreate(
) *applicationBeforeCreate {
return &applicationBeforeCreate{
applicationBase: &applicationBase{
immutable: false,
application: argApplication,
oldApplication: argOldApplication,
},
}
}
// ApplicationBeforeCreateImmutable creates beforeCreate for system:application resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func ApplicationBeforeCreateImmutable(
argApplication *types.Application,
argOldApplication *types.Application,
) *applicationBeforeCreate {
return &applicationBeforeCreate{
applicationBase: &applicationBase{
immutable: true,
application: argApplication,
oldApplication: argOldApplication,
},
@@ -172,6 +211,25 @@ func ApplicationBeforeUpdate(
) *applicationBeforeUpdate {
return &applicationBeforeUpdate{
applicationBase: &applicationBase{
immutable: false,
application: argApplication,
oldApplication: argOldApplication,
},
}
}
// ApplicationBeforeUpdateImmutable creates beforeUpdate for system:application resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func ApplicationBeforeUpdateImmutable(
argApplication *types.Application,
argOldApplication *types.Application,
) *applicationBeforeUpdate {
return &applicationBeforeUpdate{
applicationBase: &applicationBase{
immutable: true,
application: argApplication,
oldApplication: argOldApplication,
},
@@ -187,6 +245,25 @@ func ApplicationBeforeDelete(
) *applicationBeforeDelete {
return &applicationBeforeDelete{
applicationBase: &applicationBase{
immutable: false,
application: argApplication,
oldApplication: argOldApplication,
},
}
}
// ApplicationBeforeDeleteImmutable creates beforeDelete for system:application resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func ApplicationBeforeDeleteImmutable(
argApplication *types.Application,
argOldApplication *types.Application,
) *applicationBeforeDelete {
return &applicationBeforeDelete{
applicationBase: &applicationBase{
immutable: true,
application: argApplication,
oldApplication: argOldApplication,
},
@@ -202,6 +279,25 @@ func ApplicationAfterCreate(
) *applicationAfterCreate {
return &applicationAfterCreate{
applicationBase: &applicationBase{
immutable: false,
application: argApplication,
oldApplication: argOldApplication,
},
}
}
// ApplicationAfterCreateImmutable creates afterCreate for system:application resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func ApplicationAfterCreateImmutable(
argApplication *types.Application,
argOldApplication *types.Application,
) *applicationAfterCreate {
return &applicationAfterCreate{
applicationBase: &applicationBase{
immutable: true,
application: argApplication,
oldApplication: argOldApplication,
},
@@ -217,6 +313,25 @@ func ApplicationAfterUpdate(
) *applicationAfterUpdate {
return &applicationAfterUpdate{
applicationBase: &applicationBase{
immutable: false,
application: argApplication,
oldApplication: argOldApplication,
},
}
}
// ApplicationAfterUpdateImmutable creates afterUpdate for system:application resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func ApplicationAfterUpdateImmutable(
argApplication *types.Application,
argOldApplication *types.Application,
) *applicationAfterUpdate {
return &applicationAfterUpdate{
applicationBase: &applicationBase{
immutable: true,
application: argApplication,
oldApplication: argOldApplication,
},
@@ -232,6 +347,25 @@ func ApplicationAfterDelete(
) *applicationAfterDelete {
return &applicationAfterDelete{
applicationBase: &applicationBase{
immutable: false,
application: argApplication,
oldApplication: argOldApplication,
},
}
}
// ApplicationAfterDeleteImmutable creates afterDelete for system:application resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func ApplicationAfterDeleteImmutable(
argApplication *types.Application,
argOldApplication *types.Application,
) *applicationAfterDelete {
return &applicationAfterDelete{
applicationBase: &applicationBase{
immutable: true,
application: argApplication,
oldApplication: argOldApplication,
},
@@ -294,6 +428,10 @@ func (res applicationBase) Encode() (args map[string][]byte, err error) {
// Decode return values from Corredor script into struct props
func (res *applicationBase) Decode(results map[string][]byte) (err error) {
if res.immutable {
// Respect immutability
return
}
if r, ok := results["result"]; ok && len(results) == 1 {
if err = json.Unmarshal(r, res.application); err != nil {
return
+92 -11
View File
@@ -22,9 +22,10 @@ type (
//
// This type is auto-generated.
authBase struct {
user *types.User
provider *types.AuthProvider
invoker auth.Identifiable
immutable bool
user *types.User
provider *types.AuthProvider
invoker auth.Identifiable
}
// authBeforeLogin
@@ -100,8 +101,27 @@ func AuthBeforeLogin(
) *authBeforeLogin {
return &authBeforeLogin{
authBase: &authBase{
user: argUser,
provider: argProvider,
immutable: false,
user: argUser,
provider: argProvider,
},
}
}
// AuthBeforeLoginImmutable creates beforeLogin for system:auth resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func AuthBeforeLoginImmutable(
argUser *types.User,
argProvider *types.AuthProvider,
) *authBeforeLogin {
return &authBeforeLogin{
authBase: &authBase{
immutable: true,
user: argUser,
provider: argProvider,
},
}
}
@@ -115,8 +135,27 @@ func AuthBeforeSignup(
) *authBeforeSignup {
return &authBeforeSignup{
authBase: &authBase{
user: argUser,
provider: argProvider,
immutable: false,
user: argUser,
provider: argProvider,
},
}
}
// AuthBeforeSignupImmutable creates beforeSignup for system:auth resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func AuthBeforeSignupImmutable(
argUser *types.User,
argProvider *types.AuthProvider,
) *authBeforeSignup {
return &authBeforeSignup{
authBase: &authBase{
immutable: true,
user: argUser,
provider: argProvider,
},
}
}
@@ -130,8 +169,27 @@ func AuthAfterLogin(
) *authAfterLogin {
return &authAfterLogin{
authBase: &authBase{
user: argUser,
provider: argProvider,
immutable: false,
user: argUser,
provider: argProvider,
},
}
}
// AuthAfterLoginImmutable creates afterLogin for system:auth resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func AuthAfterLoginImmutable(
argUser *types.User,
argProvider *types.AuthProvider,
) *authAfterLogin {
return &authAfterLogin{
authBase: &authBase{
immutable: true,
user: argUser,
provider: argProvider,
},
}
}
@@ -145,8 +203,27 @@ func AuthAfterSignup(
) *authAfterSignup {
return &authAfterSignup{
authBase: &authBase{
user: argUser,
provider: argProvider,
immutable: false,
user: argUser,
provider: argProvider,
},
}
}
// AuthAfterSignupImmutable creates afterSignup for system:auth resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func AuthAfterSignupImmutable(
argUser *types.User,
argProvider *types.AuthProvider,
) *authAfterSignup {
return &authAfterSignup{
authBase: &authBase{
immutable: true,
user: argUser,
provider: argProvider,
},
}
}
@@ -214,6 +291,10 @@ func (res authBase) Encode() (args map[string][]byte, err error) {
// Decode return values from Corredor script into struct props
func (res *authBase) Decode(results map[string][]byte) (err error) {
if res.immutable {
// Respect immutability
return
}
if r, ok := results["result"]; ok && len(results) == 1 {
if err = json.Unmarshal(r, res.user); err != nil {
return
+61 -5
View File
@@ -22,8 +22,9 @@ type (
//
// This type is auto-generated.
mailBase struct {
message *types.MailMessage
invoker auth.Identifiable
immutable bool
message *types.MailMessage
invoker auth.Identifiable
}
// mailOnManual
@@ -84,7 +85,24 @@ func MailOnManual(
) *mailOnManual {
return &mailOnManual{
mailBase: &mailBase{
message: argMessage,
immutable: false,
message: argMessage,
},
}
}
// MailOnManualImmutable creates onManual for system:mail resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func MailOnManualImmutable(
argMessage *types.MailMessage,
) *mailOnManual {
return &mailOnManual{
mailBase: &mailBase{
immutable: true,
message: argMessage,
},
}
}
@@ -97,7 +115,24 @@ func MailOnReceive(
) *mailOnReceive {
return &mailOnReceive{
mailBase: &mailBase{
message: argMessage,
immutable: false,
message: argMessage,
},
}
}
// MailOnReceiveImmutable creates onReceive for system:mail resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func MailOnReceiveImmutable(
argMessage *types.MailMessage,
) *mailOnReceive {
return &mailOnReceive{
mailBase: &mailBase{
immutable: true,
message: argMessage,
},
}
}
@@ -110,7 +145,24 @@ func MailOnSend(
) *mailOnSend {
return &mailOnSend{
mailBase: &mailBase{
message: argMessage,
immutable: false,
message: argMessage,
},
}
}
// MailOnSendImmutable creates onSend for system:mail resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func MailOnSendImmutable(
argMessage *types.MailMessage,
) *mailOnSend {
return &mailOnSend{
mailBase: &mailBase{
immutable: true,
message: argMessage,
},
}
}
@@ -160,6 +212,10 @@ func (res mailBase) Encode() (args map[string][]byte, err error) {
// Decode return values from Corredor script into struct props
func (res *mailBase) Decode(results map[string][]byte) (err error) {
if res.immutable {
// Respect immutability
return
}
if r, ok := results["result"]; ok && len(results) == 1 {
if err = json.Unmarshal(r, res.message); err != nil {
return
+155 -17
View File
@@ -22,9 +22,10 @@ type (
//
// This type is auto-generated.
roleBase struct {
role *types.Role
oldRole *types.Role
invoker auth.Identifiable
immutable bool
role *types.Role
oldRole *types.Role
invoker auth.Identifiable
}
// roleOnManual
@@ -142,8 +143,27 @@ func RoleOnManual(
) *roleOnManual {
return &roleOnManual{
roleBase: &roleBase{
role: argRole,
oldRole: argOldRole,
immutable: false,
role: argRole,
oldRole: argOldRole,
},
}
}
// RoleOnManualImmutable creates onManual for system:role resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func RoleOnManualImmutable(
argRole *types.Role,
argOldRole *types.Role,
) *roleOnManual {
return &roleOnManual{
roleBase: &roleBase{
immutable: true,
role: argRole,
oldRole: argOldRole,
},
}
}
@@ -157,8 +177,27 @@ func RoleBeforeCreate(
) *roleBeforeCreate {
return &roleBeforeCreate{
roleBase: &roleBase{
role: argRole,
oldRole: argOldRole,
immutable: false,
role: argRole,
oldRole: argOldRole,
},
}
}
// RoleBeforeCreateImmutable creates beforeCreate for system:role resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func RoleBeforeCreateImmutable(
argRole *types.Role,
argOldRole *types.Role,
) *roleBeforeCreate {
return &roleBeforeCreate{
roleBase: &roleBase{
immutable: true,
role: argRole,
oldRole: argOldRole,
},
}
}
@@ -172,8 +211,27 @@ func RoleBeforeUpdate(
) *roleBeforeUpdate {
return &roleBeforeUpdate{
roleBase: &roleBase{
role: argRole,
oldRole: argOldRole,
immutable: false,
role: argRole,
oldRole: argOldRole,
},
}
}
// RoleBeforeUpdateImmutable creates beforeUpdate for system:role resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func RoleBeforeUpdateImmutable(
argRole *types.Role,
argOldRole *types.Role,
) *roleBeforeUpdate {
return &roleBeforeUpdate{
roleBase: &roleBase{
immutable: true,
role: argRole,
oldRole: argOldRole,
},
}
}
@@ -187,8 +245,27 @@ func RoleBeforeDelete(
) *roleBeforeDelete {
return &roleBeforeDelete{
roleBase: &roleBase{
role: argRole,
oldRole: argOldRole,
immutable: false,
role: argRole,
oldRole: argOldRole,
},
}
}
// RoleBeforeDeleteImmutable creates beforeDelete for system:role resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func RoleBeforeDeleteImmutable(
argRole *types.Role,
argOldRole *types.Role,
) *roleBeforeDelete {
return &roleBeforeDelete{
roleBase: &roleBase{
immutable: true,
role: argRole,
oldRole: argOldRole,
},
}
}
@@ -202,8 +279,27 @@ func RoleAfterCreate(
) *roleAfterCreate {
return &roleAfterCreate{
roleBase: &roleBase{
role: argRole,
oldRole: argOldRole,
immutable: false,
role: argRole,
oldRole: argOldRole,
},
}
}
// RoleAfterCreateImmutable creates afterCreate for system:role resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func RoleAfterCreateImmutable(
argRole *types.Role,
argOldRole *types.Role,
) *roleAfterCreate {
return &roleAfterCreate{
roleBase: &roleBase{
immutable: true,
role: argRole,
oldRole: argOldRole,
},
}
}
@@ -217,8 +313,27 @@ func RoleAfterUpdate(
) *roleAfterUpdate {
return &roleAfterUpdate{
roleBase: &roleBase{
role: argRole,
oldRole: argOldRole,
immutable: false,
role: argRole,
oldRole: argOldRole,
},
}
}
// RoleAfterUpdateImmutable creates afterUpdate for system:role resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func RoleAfterUpdateImmutable(
argRole *types.Role,
argOldRole *types.Role,
) *roleAfterUpdate {
return &roleAfterUpdate{
roleBase: &roleBase{
immutable: true,
role: argRole,
oldRole: argOldRole,
},
}
}
@@ -232,8 +347,27 @@ func RoleAfterDelete(
) *roleAfterDelete {
return &roleAfterDelete{
roleBase: &roleBase{
role: argRole,
oldRole: argOldRole,
immutable: false,
role: argRole,
oldRole: argOldRole,
},
}
}
// RoleAfterDeleteImmutable creates afterDelete for system:role resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func RoleAfterDeleteImmutable(
argRole *types.Role,
argOldRole *types.Role,
) *roleAfterDelete {
return &roleAfterDelete{
roleBase: &roleBase{
immutable: true,
role: argRole,
oldRole: argOldRole,
},
}
}
@@ -294,6 +428,10 @@ func (res roleBase) Encode() (args map[string][]byte, err error) {
// Decode return values from Corredor script into struct props
func (res *roleBase) Decode(results map[string][]byte) (err error) {
if res.immutable {
// Respect immutability
return
}
if r, ok := results["result"]; ok && len(results) == 1 {
if err = json.Unmarshal(r, res.role); err != nil {
return
+92 -11
View File
@@ -22,9 +22,10 @@ type (
//
// This type is auto-generated.
roleMemberBase struct {
user *types.User
role *types.Role
invoker auth.Identifiable
immutable bool
user *types.User
role *types.Role
invoker auth.Identifiable
}
// roleMemberBeforeAdd
@@ -100,8 +101,27 @@ func RoleMemberBeforeAdd(
) *roleMemberBeforeAdd {
return &roleMemberBeforeAdd{
roleMemberBase: &roleMemberBase{
user: argUser,
role: argRole,
immutable: false,
user: argUser,
role: argRole,
},
}
}
// RoleMemberBeforeAddImmutable creates beforeAdd for system:role:member resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func RoleMemberBeforeAddImmutable(
argUser *types.User,
argRole *types.Role,
) *roleMemberBeforeAdd {
return &roleMemberBeforeAdd{
roleMemberBase: &roleMemberBase{
immutable: true,
user: argUser,
role: argRole,
},
}
}
@@ -115,8 +135,27 @@ func RoleMemberBeforeRemove(
) *roleMemberBeforeRemove {
return &roleMemberBeforeRemove{
roleMemberBase: &roleMemberBase{
user: argUser,
role: argRole,
immutable: false,
user: argUser,
role: argRole,
},
}
}
// RoleMemberBeforeRemoveImmutable creates beforeRemove for system:role:member resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func RoleMemberBeforeRemoveImmutable(
argUser *types.User,
argRole *types.Role,
) *roleMemberBeforeRemove {
return &roleMemberBeforeRemove{
roleMemberBase: &roleMemberBase{
immutable: true,
user: argUser,
role: argRole,
},
}
}
@@ -130,8 +169,27 @@ func RoleMemberAfterAdd(
) *roleMemberAfterAdd {
return &roleMemberAfterAdd{
roleMemberBase: &roleMemberBase{
user: argUser,
role: argRole,
immutable: false,
user: argUser,
role: argRole,
},
}
}
// RoleMemberAfterAddImmutable creates afterAdd for system:role:member resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func RoleMemberAfterAddImmutable(
argUser *types.User,
argRole *types.Role,
) *roleMemberAfterAdd {
return &roleMemberAfterAdd{
roleMemberBase: &roleMemberBase{
immutable: true,
user: argUser,
role: argRole,
},
}
}
@@ -145,8 +203,27 @@ func RoleMemberAfterRemove(
) *roleMemberAfterRemove {
return &roleMemberAfterRemove{
roleMemberBase: &roleMemberBase{
user: argUser,
role: argRole,
immutable: false,
user: argUser,
role: argRole,
},
}
}
// RoleMemberAfterRemoveImmutable creates afterRemove for system:role:member resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func RoleMemberAfterRemoveImmutable(
argUser *types.User,
argRole *types.Role,
) *roleMemberAfterRemove {
return &roleMemberAfterRemove{
roleMemberBase: &roleMemberBase{
immutable: true,
user: argUser,
role: argRole,
},
}
}
@@ -214,6 +291,10 @@ func (res roleMemberBase) Encode() (args map[string][]byte, err error) {
// Decode return values from Corredor script into struct props
func (res *roleMemberBase) Decode(results map[string][]byte) (err error) {
if res.immutable {
// Respect immutability
return
}
if r, ok := results["result"]; ok && len(results) == 1 {
if err = json.Unmarshal(r, res.user); err != nil {
return
+29 -5
View File
@@ -22,9 +22,10 @@ type (
//
// This type is auto-generated.
sinkBase struct {
response *types.SinkResponse
request *types.SinkRequest
invoker auth.Identifiable
immutable bool
response *types.SinkResponse
request *types.SinkRequest
invoker auth.Identifiable
}
// sinkOnRequest
@@ -58,8 +59,27 @@ func SinkOnRequest(
) *sinkOnRequest {
return &sinkOnRequest{
sinkBase: &sinkBase{
response: argResponse,
request: argRequest,
immutable: false,
response: argResponse,
request: argRequest,
},
}
}
// SinkOnRequestImmutable creates onRequest for system:sink resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func SinkOnRequestImmutable(
argResponse *types.SinkResponse,
argRequest *types.SinkRequest,
) *sinkOnRequest {
return &sinkOnRequest{
sinkBase: &sinkBase{
immutable: true,
response: argResponse,
request: argRequest,
},
}
}
@@ -120,6 +140,10 @@ func (res sinkBase) Encode() (args map[string][]byte, err error) {
// Decode return values from Corredor script into struct props
func (res *sinkBase) Decode(results map[string][]byte) (err error) {
if res.immutable {
// Respect immutability
return
}
if r, ok := results["result"]; ok && len(results) == 1 {
if err = json.Unmarshal(r, res.response); err != nil {
return
+54 -4
View File
@@ -20,7 +20,8 @@ type (
//
// This type is auto-generated.
systemBase struct {
invoker auth.Identifiable
immutable bool
invoker auth.Identifiable
}
// systemOnManual
@@ -78,7 +79,22 @@ func (systemOnTimestamp) EventType() string {
// This function is auto-generated.
func SystemOnManual() *systemOnManual {
return &systemOnManual{
systemBase: &systemBase{},
systemBase: &systemBase{
immutable: false,
},
}
}
// SystemOnManualImmutable creates onManual for system resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func SystemOnManualImmutable() *systemOnManual {
return &systemOnManual{
systemBase: &systemBase{
immutable: true,
},
}
}
@@ -87,7 +103,22 @@ func SystemOnManual() *systemOnManual {
// This function is auto-generated.
func SystemOnInterval() *systemOnInterval {
return &systemOnInterval{
systemBase: &systemBase{},
systemBase: &systemBase{
immutable: false,
},
}
}
// SystemOnIntervalImmutable creates onInterval for system resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func SystemOnIntervalImmutable() *systemOnInterval {
return &systemOnInterval{
systemBase: &systemBase{
immutable: true,
},
}
}
@@ -96,7 +127,22 @@ func SystemOnInterval() *systemOnInterval {
// This function is auto-generated.
func SystemOnTimestamp() *systemOnTimestamp {
return &systemOnTimestamp{
systemBase: &systemBase{},
systemBase: &systemBase{
immutable: false,
},
}
}
// SystemOnTimestampImmutable creates onTimestamp for system resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func SystemOnTimestampImmutable() *systemOnTimestamp {
return &systemOnTimestamp{
systemBase: &systemBase{
immutable: true,
},
}
}
@@ -127,6 +173,10 @@ func (res systemBase) Encode() (args map[string][]byte, err error) {
// Decode return values from Corredor script into struct props
func (res *systemBase) Decode(results map[string][]byte) (err error) {
if res.immutable {
// Respect immutability
return
}
if r, ok := results["invoker"]; ok && len(results) == 1 {
if err = json.Unmarshal(r, res.invoker); err != nil {
return
+155 -17
View File
@@ -22,9 +22,10 @@ type (
//
// This type is auto-generated.
userBase struct {
user *types.User
oldUser *types.User
invoker auth.Identifiable
immutable bool
user *types.User
oldUser *types.User
invoker auth.Identifiable
}
// userOnManual
@@ -142,8 +143,27 @@ func UserOnManual(
) *userOnManual {
return &userOnManual{
userBase: &userBase{
user: argUser,
oldUser: argOldUser,
immutable: false,
user: argUser,
oldUser: argOldUser,
},
}
}
// UserOnManualImmutable creates onManual for system:user resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func UserOnManualImmutable(
argUser *types.User,
argOldUser *types.User,
) *userOnManual {
return &userOnManual{
userBase: &userBase{
immutable: true,
user: argUser,
oldUser: argOldUser,
},
}
}
@@ -157,8 +177,27 @@ func UserBeforeCreate(
) *userBeforeCreate {
return &userBeforeCreate{
userBase: &userBase{
user: argUser,
oldUser: argOldUser,
immutable: false,
user: argUser,
oldUser: argOldUser,
},
}
}
// UserBeforeCreateImmutable creates beforeCreate for system:user resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func UserBeforeCreateImmutable(
argUser *types.User,
argOldUser *types.User,
) *userBeforeCreate {
return &userBeforeCreate{
userBase: &userBase{
immutable: true,
user: argUser,
oldUser: argOldUser,
},
}
}
@@ -172,8 +211,27 @@ func UserBeforeUpdate(
) *userBeforeUpdate {
return &userBeforeUpdate{
userBase: &userBase{
user: argUser,
oldUser: argOldUser,
immutable: false,
user: argUser,
oldUser: argOldUser,
},
}
}
// UserBeforeUpdateImmutable creates beforeUpdate for system:user resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func UserBeforeUpdateImmutable(
argUser *types.User,
argOldUser *types.User,
) *userBeforeUpdate {
return &userBeforeUpdate{
userBase: &userBase{
immutable: true,
user: argUser,
oldUser: argOldUser,
},
}
}
@@ -187,8 +245,27 @@ func UserBeforeDelete(
) *userBeforeDelete {
return &userBeforeDelete{
userBase: &userBase{
user: argUser,
oldUser: argOldUser,
immutable: false,
user: argUser,
oldUser: argOldUser,
},
}
}
// UserBeforeDeleteImmutable creates beforeDelete for system:user resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func UserBeforeDeleteImmutable(
argUser *types.User,
argOldUser *types.User,
) *userBeforeDelete {
return &userBeforeDelete{
userBase: &userBase{
immutable: true,
user: argUser,
oldUser: argOldUser,
},
}
}
@@ -202,8 +279,27 @@ func UserAfterCreate(
) *userAfterCreate {
return &userAfterCreate{
userBase: &userBase{
user: argUser,
oldUser: argOldUser,
immutable: false,
user: argUser,
oldUser: argOldUser,
},
}
}
// UserAfterCreateImmutable creates afterCreate for system:user resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func UserAfterCreateImmutable(
argUser *types.User,
argOldUser *types.User,
) *userAfterCreate {
return &userAfterCreate{
userBase: &userBase{
immutable: true,
user: argUser,
oldUser: argOldUser,
},
}
}
@@ -217,8 +313,27 @@ func UserAfterUpdate(
) *userAfterUpdate {
return &userAfterUpdate{
userBase: &userBase{
user: argUser,
oldUser: argOldUser,
immutable: false,
user: argUser,
oldUser: argOldUser,
},
}
}
// UserAfterUpdateImmutable creates afterUpdate for system:user resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func UserAfterUpdateImmutable(
argUser *types.User,
argOldUser *types.User,
) *userAfterUpdate {
return &userAfterUpdate{
userBase: &userBase{
immutable: true,
user: argUser,
oldUser: argOldUser,
},
}
}
@@ -232,8 +347,27 @@ func UserAfterDelete(
) *userAfterDelete {
return &userAfterDelete{
userBase: &userBase{
user: argUser,
oldUser: argOldUser,
immutable: false,
user: argUser,
oldUser: argOldUser,
},
}
}
// UserAfterDeleteImmutable creates afterDelete for system:user resource
//
// None of the arguments will be mutable!
//
// This function is auto-generated.
func UserAfterDeleteImmutable(
argUser *types.User,
argOldUser *types.User,
) *userAfterDelete {
return &userAfterDelete{
userBase: &userBase{
immutable: true,
user: argUser,
oldUser: argOldUser,
},
}
}
@@ -294,6 +428,10 @@ func (res userBase) Encode() (args map[string][]byte, err error) {
// Decode return values from Corredor script into struct props
func (res *userBase) Decode(results map[string][]byte) (err error) {
if res.immutable {
// Respect immutability
return
}
if r, ok := results["result"]; ok && len(results) == 1 {
if err = json.Unmarshal(r, res.user); err != nil {
return