diff --git a/src/git.xdrm.io/schastsp/client/keyset/keyset.go b/src/git.xdrm.io/schastsp/client/keyset/keyset.go index 5c47d9a..dcc1b53 100644 --- a/src/git.xdrm.io/schastsp/client/keyset/keyset.go +++ b/src/git.xdrm.io/schastsp/client/keyset/keyset.go @@ -183,3 +183,26 @@ func (s *T) Fetch(reader io.Reader) error { return nil } + + +/* (6) Getter/Setter for migration code 'mcode' +* +* @mcode [OPT] New value +* +* @return mcode Migration code +* +---------------------------------------------------------*/ +func (s T) MigrationCode(optional... uint8) uint8 { + + /* (1) If no valid code given -> return current one */ + if len(optional) < 1 || optional[0] > 3 { + return s.mcode + } + + /* (2) Set new code */ + s.mcode = optional[0] + + /* (3) Return new code */ + return s.mcode + +}