MM-69175: Fix broken CI steps (#36989)

* Fix broken migration/codegen CI self-checks

The git status self-checks in server-ci.yml became silent no-ops once
these jobs moved into the build container (#33679): the resolved shell
is sh, where the bash-only [[ ]] errors out, and git rejects the
checkout with "dubious ownership". Switch to POSIX [ ], mark the
workspace safe so git status runs, and print the diff on failure across
all affected checks.

* Regenerate stale migrations.list

The broken check-migrations step let an outdated migrations.list ship.
Regenerate it with make migrations-extract to add migration 000193.

* make mocks

* make gen-serialized

* make mmctl-docs
This commit is contained in:
Alejandro García Montoro
2026-06-10 13:54:10 +02:00
committed by GitHub
parent 7ecd62ddc1
commit 2e3c0ff278
18 changed files with 595 additions and 71 deletions
+62 -9
View File
@@ -74,7 +74,13 @@ jobs:
- name: Generate mocks
run: make mocks
- name: Check mocks
run: if [[ -n $(git status --porcelain) ]]; then echo "Please update the mocks using `make mocks`"; exit 1; fi
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
if [ -n "$(git status --porcelain)" ]; then
echo "Please update the mocks using 'make mocks'"
git diff
exit 1
fi
check-go-mod-tidy:
name: Check go mod tidy
needs: go
@@ -93,7 +99,13 @@ jobs:
- name: Run go mod tidy
run: make modules-tidy
- name: Check modules
run: if [[ -n $(git status --porcelain) ]]; then echo "Please tidy up the Go modules using make modules-tidy"; git diff; exit 1; fi
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
if [ -n "$(git status --porcelain)" ]; then
echo "Please tidy up the Go modules using make modules-tidy"
git diff
exit 1
fi
check-go-fix:
name: Check go fix
needs: go
@@ -112,7 +124,13 @@ jobs:
- name: Run go fix
run: go fix ./...
- name: Check go fix
run: if [[ -n $(git status --porcelain) ]]; then echo "Please run 'go fix ./...' and commit the changes"; git diff; exit 1; fi
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
if [ -n "$(git status --porcelain)" ]; then
echo "Please run 'go fix ./...' and commit the changes"
git diff
exit 1
fi
check-style:
name: check-style
needs: go
@@ -148,7 +166,13 @@ jobs:
- name: Run make-gen-serialized
run: make gen-serialized
- name: Check serialized
run: if [[ -n $(git status --porcelain) ]]; then echo "Please update the serialized files using 'make gen-serialized'"; exit 1; fi
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
if [ -n "$(git status --porcelain)" ]; then
echo "Please update the serialized files using 'make gen-serialized'"
git diff
exit 1
fi
check-mattermost-vet-api:
name: Vet API
needs: go
@@ -182,7 +206,13 @@ jobs:
- name: Extract migrations files
run: make migrations-extract
- name: Check migration files
run: if [[ -n $(git status --porcelain) ]]; then echo "Please update the migrations using make migrations-extract"; exit 1; fi
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
if [ -n "$(git status --porcelain)" ]; then
echo "Please update the migrations using make migrations-extract"
git diff
exit 1
fi
check-email-templates:
name: Generate email templates
needs: go
@@ -201,7 +231,13 @@ jobs:
npm install -g mjml@4.9.0
make build-templates
- name: Check generated email templates
run: if [[ -n $(git status --porcelain) ]]; then echo "Please update the email templates using `make build-templates`"; exit 1; fi
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
if [ -n "$(git status --porcelain)" ]; then
echo "Please update the email templates using 'make build-templates'"
git diff
exit 1
fi
check-store-layers:
name: Check store layers
needs: go
@@ -220,7 +256,13 @@ jobs:
- name: Generate store layers
run: make store-layers
- name: Check generated code
run: if [[ -n $(git status --porcelain) ]]; then echo "Please update the store layers using make store-layers"; exit 1; fi
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
if [ -n "$(git status --porcelain)" ]; then
echo "Please update the store layers using make store-layers"
git diff
exit 1
fi
check-default-roles-permissions:
name: Check default roles permissions
needs: go
@@ -254,7 +296,13 @@ jobs:
IS_CI: "true"
run: make default-roles-permissions
- name: Check generated code
run: if [[ -n $(git status --porcelain) ]]; then echo "Please update the default roles permissions using make default-roles-permissions"; exit 1; fi
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
if [ -n "$(git status --porcelain)" ]; then
echo "Please update the default roles permissions using make default-roles-permissions"
git diff
exit 1
fi
check-mmctl-docs:
name: Check mmctl docs
needs: go
@@ -274,7 +322,12 @@ jobs:
run: |
echo "Making sure docs are updated"
make mmctl-docs
if [[ -n $(git status --porcelain) ]]; then echo "Please update the mmctl docs using make mmctl-docs"; exit 1; fi
git config --global --add safe.directory "$GITHUB_WORKSPACE"
if [ -n "$(git status --porcelain)" ]; then
echo "Please update the mmctl docs using make mmctl-docs"
git diff
exit 1
fi
# NOTE: Postgres with binary parameters has been moved to server-ci-weekly.yml
# (runs Monday 1am EST / 5am UTC). Low regression risk doesn't justify
# consuming 8-core runners on every push.
@@ -379,3 +379,5 @@ channels/db/migrations/postgres/000190_channel_bookmarks_board_target_id.down.sq
channels/db/migrations/postgres/000190_channel_bookmarks_board_target_id.up.sql
channels/db/migrations/postgres/000191_channel_bookmarks_target_id_index.down.sql
channels/db/migrations/postgres/000191_channel_bookmarks_target_id_index.up.sql
channels/db/migrations/postgres/000193_add_property_groups_schema_version.down.sql
channels/db/migrations/postgres/000193_add_property_groups_schema_version.up.sql
+30 -30
View File
@@ -516,6 +516,36 @@ func (_m *Store) GetDbVersion(numerical bool) (string, error) {
return r0, r1
}
// GetDiagnostics provides a mock function with given fields: ctx
func (_m *Store) GetDiagnostics(ctx context.Context) (*store.DatabaseDiagnostics, error) {
ret := _m.Called(ctx)
if len(ret) == 0 {
panic("no return value specified for GetDiagnostics")
}
var r0 *store.DatabaseDiagnostics
var r1 error
if rf, ok := ret.Get(0).(func(context.Context) (*store.DatabaseDiagnostics, error)); ok {
return rf(ctx)
}
if rf, ok := ret.Get(0).(func(context.Context) *store.DatabaseDiagnostics); ok {
r0 = rf(ctx)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*store.DatabaseDiagnostics)
}
}
if rf, ok := ret.Get(1).(func(context.Context) error); ok {
r1 = rf(ctx)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// GetInternalMasterDB provides a mock function with no fields
func (_m *Store) GetInternalMasterDB() *sql.DB {
ret := _m.Called()
@@ -614,36 +644,6 @@ func (_m *Store) GetSchemaDefinition() (*model.SupportPacketDatabaseSchema, erro
return r0, r1
}
// GetDiagnostics provides a mock function with given fields: ctx
func (_m *Store) GetDiagnostics(ctx context.Context) (*store.DatabaseDiagnostics, error) {
ret := _m.Called(ctx)
if len(ret) == 0 {
panic("no return value specified for GetDiagnostics")
}
var r0 *store.DatabaseDiagnostics
var r1 error
if rf, ok := ret.Get(0).(func(context.Context) (*store.DatabaseDiagnostics, error)); ok {
return rf(ctx)
}
if rf, ok := ret.Get(0).(func(context.Context) *store.DatabaseDiagnostics); ok {
r0 = rf(ctx)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*store.DatabaseDiagnostics)
}
}
if rf, ok := ret.Get(1).(func(context.Context) error); ok {
r1 = rf(ctx)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Group provides a mock function with no fields
func (_m *Store) Group() store.GroupStore {
ret := _m.Called()
@@ -78,36 +78,6 @@ func (_m *UserAccessTokenStore) DeleteByIds(tokenIDs []string) (int64, error) {
return r0, r1
}
// GetExpiredBefore provides a mock function with given fields: cutoff, limit
func (_m *UserAccessTokenStore) GetExpiredBefore(cutoff int64, limit int) ([]*model.UserAccessToken, error) {
ret := _m.Called(cutoff, limit)
if len(ret) == 0 {
panic("no return value specified for GetExpiredBefore")
}
var r0 []*model.UserAccessToken
var r1 error
if rf, ok := ret.Get(0).(func(int64, int) ([]*model.UserAccessToken, error)); ok {
return rf(cutoff, limit)
}
if rf, ok := ret.Get(0).(func(int64, int) []*model.UserAccessToken); ok {
r0 = rf(cutoff, limit)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*model.UserAccessToken)
}
}
if rf, ok := ret.Get(1).(func(int64, int) error); ok {
r1 = rf(cutoff, limit)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Get provides a mock function with given fields: tokenID
func (_m *UserAccessTokenStore) Get(tokenID string) (*model.UserAccessToken, error) {
ret := _m.Called(tokenID)
@@ -228,6 +198,36 @@ func (_m *UserAccessTokenStore) GetByUser(userID string, page int, perPage int)
return r0, r1
}
// GetExpiredBefore provides a mock function with given fields: cutoff, limit
func (_m *UserAccessTokenStore) GetExpiredBefore(cutoff int64, limit int) ([]*model.UserAccessToken, error) {
ret := _m.Called(cutoff, limit)
if len(ret) == 0 {
panic("no return value specified for GetExpiredBefore")
}
var r0 []*model.UserAccessToken
var r1 error
if rf, ok := ret.Get(0).(func(int64, int) ([]*model.UserAccessToken, error)); ok {
return rf(cutoff, limit)
}
if rf, ok := ret.Get(0).(func(int64, int) []*model.UserAccessToken); ok {
r0 = rf(cutoff, limit)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*model.UserAccessToken)
}
}
if rf, ok := ret.Get(1).(func(int64, int) error); ok {
r1 = rf(cutoff, limit)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Save provides a mock function with given fields: token
func (_m *UserAccessTokenStore) Save(token *model.UserAccessToken) (*model.UserAccessToken, error) {
ret := _m.Called(token)
+1
View File
@@ -51,6 +51,7 @@ SEE ALSO
* `mmctl permissions <mmctl_permissions.rst>`_ - Management of permissions
* `mmctl plugin <mmctl_plugin.rst>`_ - Management of plugins
* `mmctl post <mmctl_post.rst>`_ - Management of posts
* `mmctl report <mmctl_report.rst>`_ - Reporting commands
* `mmctl roles <mmctl_roles.rst>`_ - Manage user roles
* `mmctl saml <mmctl_saml.rst>`_ - SAML related utilities
* `mmctl sampledata <mmctl_sampledata.rst>`_ - Generate sample data
@@ -30,6 +30,7 @@ Options
--bypass-upload If this is set, the file is not processed from the server, but rather directly read from the filesystem. Works only in --local mode.
--extract-content If this is set, document attachments will be extracted and indexed during the import process. It is advised to disable it to improve performance. (default true)
-h, --help help for process
--workers int The number of concurrent import worker goroutines. Controls database load during import. When set to 0 (default), uses the number of CPUs available. Maximum allowed is 4x the CPU count.
Options inherited from parent commands
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+1
View File
@@ -37,6 +37,7 @@ SEE ALSO
~~~~~~~~
* `mmctl <mmctl.rst>`_ - Remote client for the Open Source, self-hosted Slack-alternative
* `mmctl license get <mmctl_license_get.rst>`_ - Get the current license.
* `mmctl license remove <mmctl_license_remove.rst>`_ - Remove the current license.
* `mmctl license upload <mmctl_license_upload.rst>`_ - Upload a license.
* `mmctl license upload-string <mmctl_license_upload-string.rst>`_ - Upload a license from a string.
@@ -0,0 +1,51 @@
.. _mmctl_license_get:
mmctl license get
-----------------
Get the current license.
Synopsis
~~~~~~~~
Get the current server license and print it.
::
mmctl license get [flags]
Examples
~~~~~~~~
::
license get
Options
~~~~~~~
::
-h, --help help for get
Options inherited from parent commands
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
::
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
--disable-pager disables paged output
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--json the output format will be in json format
--local allows communicating with the server through a unix socket
--quiet prevent mmctl to generate output for the commands
--strict will only run commands if the mmctl version matches the server one
--suppress-warnings disables printing warning messages
SEE ALSO
~~~~~~~~
* `mmctl license <mmctl_license.rst>`_ - Licensing commands
+1
View File
@@ -40,4 +40,5 @@ SEE ALSO
* `mmctl post create <mmctl_post_create.rst>`_ - Create a post
* `mmctl post delete <mmctl_post_delete.rst>`_ - Mark posts as deleted or permanently delete posts with the --permanent flag
* `mmctl post list <mmctl_post_list.rst>`_ - List posts for a channel
* `mmctl post reveal <mmctl_post_reveal.rst>`_ - Reveal a post
@@ -27,6 +27,7 @@ Options
::
-b, --burn-on-read Message will be deleted after a certain time after being read
-h, --help help for create
-m, --message string Message for the post
-r, --reply-to string Post id to reply to
@@ -0,0 +1,51 @@
.. _mmctl_post_reveal:
mmctl post reveal
-----------------
Reveal a post
Synopsis
~~~~~~~~
Reveal a post
::
mmctl post reveal [post] [flags]
Examples
~~~~~~~~
::
post reveal udjmt396tjghi8wnsk3a1qs1sw
Options
~~~~~~~
::
-h, --help help for reveal
Options inherited from parent commands
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
::
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
--disable-pager disables paged output
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--json the output format will be in json format
--local allows communicating with the server through a unix socket
--quiet prevent mmctl to generate output for the commands
--strict will only run commands if the mmctl version matches the server one
--suppress-warnings disables printing warning messages
SEE ALSO
~~~~~~~~
* `mmctl post <mmctl_post.rst>`_ - Management of posts
+41
View File
@@ -0,0 +1,41 @@
.. _mmctl_report:
mmctl report
------------
Reporting commands
Synopsis
~~~~~~~~
Reporting commands
Options
~~~~~~~
::
-h, --help help for report
Options inherited from parent commands
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
::
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
--disable-pager disables paged output
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--json the output format will be in json format
--local allows communicating with the server through a unix socket
--quiet prevent mmctl to generate output for the commands
--strict will only run commands if the mmctl version matches the server one
--suppress-warnings disables printing warning messages
SEE ALSO
~~~~~~~~
* `mmctl <mmctl.rst>`_ - Remote client for the Open Source, self-hosted Slack-alternative
* `mmctl report posts <mmctl_report_posts.rst>`_ - Retrieve posts for reporting purposes
@@ -0,0 +1,79 @@
.. _mmctl_report_posts:
mmctl report posts
------------------
Retrieve posts for reporting purposes
Synopsis
~~~~~~~~
Retrieve posts from a channel for reporting purposes. This command supports
pagination and can filter posts by time range. Results can be output in JSON format
for further processing.
::
mmctl report posts [channel] [flags]
Examples
~~~~~~~~
::
# Get posts from a channel with default settings
mmctl report posts myteam:mychannel
# Get posts with JSON output
mmctl report posts myteam:mychannel --json
# Get posts sorted by update_at in descending order
mmctl report posts myteam:mychannel --time-field update_at --sort-direction desc
# Get posts including deleted posts and metadata
mmctl report posts myteam:mychannel --include-deleted --include-metadata
# Get posts excluding ALL system posts
mmctl report posts myteam:mychannel --exclude-system-posts
# Get more posts per page (max 1000)
mmctl report posts myteam:mychannel --per-page 500
# Resume pagination from a specific cursor (use next_cursor from previous response)
mmctl report posts myteam:mychannel --cursor "MTphYmMxMjM6Y3JlYXRlX2F0OmZhbHNlOmZhbHNlOmFzYzoxNjQwMDAwMzAwMDAwOnBvc3Qz"
Options
~~~~~~~
::
--cursor string Opaque cursor for pagination (use next_cursor from previous response)
--exclude-system-posts Exclude ALL system posts (any type starting with 'system_')
-h, --help help for posts
--include-deleted Include deleted posts
--include-metadata Include file info, reactions, etc.
--per-page int Number of posts per page (max 1000) (default 100)
--sort-direction string Sort direction (asc or desc) (default "asc")
--time-field string Time field to use for sorting (create_at or update_at) (default "create_at")
Options inherited from parent commands
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
::
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
--disable-pager disables paged output
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--json the output format will be in json format
--local allows communicating with the server through a unix socket
--quiet prevent mmctl to generate output for the commands
--strict will only run commands if the mmctl version matches the server one
--suppress-warnings disables printing warning messages
SEE ALSO
~~~~~~~~
* `mmctl report <mmctl_report.rst>`_ - Reporting commands
+1
View File
@@ -37,6 +37,7 @@ SEE ALSO
~~~~~~~~
* `mmctl <mmctl.rst>`_ - Remote client for the Open Source, self-hosted Slack-alternative
* `mmctl roles list <mmctl_roles_list.rst>`_ - List available roles
* `mmctl roles member <mmctl_roles_member.rst>`_ - Remove system admin privileges
* `mmctl roles system-admin <mmctl_roles_system-admin.rst>`_ - Set a user as system admin
@@ -0,0 +1,52 @@
.. _mmctl_roles_list:
mmctl roles list
----------------
List available roles
Synopsis
~~~~~~~~
List available roles
::
mmctl roles list [flags]
Examples
~~~~~~~~
::
$ mmctl roles list
$ mmctl roles list --json
Options
~~~~~~~
::
-h, --help help for list
Options inherited from parent commands
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
::
--config string path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
--disable-pager disables paged output
--insecure-sha1-intermediate allows to use insecure TLS protocols, such as SHA-1
--insecure-tls-version allows to use TLS versions 1.0 and 1.1
--json the output format will be in json format
--local allows communicating with the server through a unix socket
--quiet prevent mmctl to generate output for the commands
--strict will only run commands if the mmctl version matches the server one
--suppress-warnings disables printing warning messages
SEE ALSO
~~~~~~~~
* `mmctl roles <mmctl_roles.rst>`_ - Manage user roles
+3 -2
View File
@@ -27,11 +27,12 @@ Options
::
--all Fetch all users. --page flag will be ignore if provided
--all Fetch all users. --page flag will be ignored if provided
-h, --help help for list
--inactive If supplied, only users which are inactive will be fetch
--inactive If supplied, only users which are inactive will be fetched
--page int Page number to fetch for the list of users
--per-page int Number of users to be fetched (default 200)
--role string If supplied, only users with the given role will be fetched
--team string If supplied, only users belonging to this team will be listed
Options inherited from parent commands
@@ -0,0 +1,60 @@
// Code generated by mockery v2.53.4. DO NOT EDIT.
// Regenerate this file using `make filestore-mocks`.
package mocks
import (
context "context"
blob "github.com/Azure/azure-sdk-for-go/sdk/storage/azblob/blob"
mock "github.com/stretchr/testify/mock"
)
// blobDownloader is an autogenerated mock type for the blobDownloader type
type blobDownloader struct {
mock.Mock
}
// DownloadStream provides a mock function with given fields: ctx, opts
func (_m *blobDownloader) DownloadStream(ctx context.Context, opts *blob.DownloadStreamOptions) (blob.DownloadStreamResponse, error) {
ret := _m.Called(ctx, opts)
if len(ret) == 0 {
panic("no return value specified for DownloadStream")
}
var r0 blob.DownloadStreamResponse
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *blob.DownloadStreamOptions) (blob.DownloadStreamResponse, error)); ok {
return rf(ctx, opts)
}
if rf, ok := ret.Get(0).(func(context.Context, *blob.DownloadStreamOptions) blob.DownloadStreamResponse); ok {
r0 = rf(ctx, opts)
} else {
r0 = ret.Get(0).(blob.DownloadStreamResponse)
}
if rf, ok := ret.Get(1).(func(context.Context, *blob.DownloadStreamOptions) error); ok {
r1 = rf(ctx, opts)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// newBlobDownloader creates a new instance of blobDownloader. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
// The first argument is typically a *testing.T value.
func newBlobDownloader(t interface {
mock.TestingT
Cleanup(func())
}) *blobDownloader {
mock := &blobDownloader{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}
+128
View File
@@ -9,6 +9,134 @@ import (
"github.com/tinylib/msgp/msgp"
)
// DecodeMsg implements msgp.Decodable
func (z *LoginTypeResponse) DecodeMsg(dc *msgp.Reader) (err error) {
var field []byte
_ = field
var zb0001 uint32
zb0001, err = dc.ReadMapHeader()
if err != nil {
err = msgp.WrapError(err)
return
}
for zb0001 > 0 {
zb0001--
field, err = dc.ReadMapKeyPtr()
if err != nil {
err = msgp.WrapError(err)
return
}
switch msgp.UnsafeString(field) {
case "AuthService":
z.AuthService, err = dc.ReadString()
if err != nil {
err = msgp.WrapError(err, "AuthService")
return
}
case "IsDeactivated":
z.IsDeactivated, err = dc.ReadBool()
if err != nil {
err = msgp.WrapError(err, "IsDeactivated")
return
}
default:
err = dc.Skip()
if err != nil {
err = msgp.WrapError(err)
return
}
}
}
return
}
// EncodeMsg implements msgp.Encodable
func (z LoginTypeResponse) EncodeMsg(en *msgp.Writer) (err error) {
// map header, size 2
// write "AuthService"
err = en.Append(0x82, 0xab, 0x41, 0x75, 0x74, 0x68, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65)
if err != nil {
return
}
err = en.WriteString(z.AuthService)
if err != nil {
err = msgp.WrapError(err, "AuthService")
return
}
// write "IsDeactivated"
err = en.Append(0xad, 0x49, 0x73, 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x64)
if err != nil {
return
}
err = en.WriteBool(z.IsDeactivated)
if err != nil {
err = msgp.WrapError(err, "IsDeactivated")
return
}
return
}
// MarshalMsg implements msgp.Marshaler
func (z LoginTypeResponse) MarshalMsg(b []byte) (o []byte, err error) {
o = msgp.Require(b, z.Msgsize())
// map header, size 2
// string "AuthService"
o = append(o, 0x82, 0xab, 0x41, 0x75, 0x74, 0x68, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65)
o = msgp.AppendString(o, z.AuthService)
// string "IsDeactivated"
o = append(o, 0xad, 0x49, 0x73, 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x64)
o = msgp.AppendBool(o, z.IsDeactivated)
return
}
// UnmarshalMsg implements msgp.Unmarshaler
func (z *LoginTypeResponse) UnmarshalMsg(bts []byte) (o []byte, err error) {
var field []byte
_ = field
var zb0001 uint32
zb0001, bts, err = msgp.ReadMapHeaderBytes(bts)
if err != nil {
err = msgp.WrapError(err)
return
}
for zb0001 > 0 {
zb0001--
field, bts, err = msgp.ReadMapKeyZC(bts)
if err != nil {
err = msgp.WrapError(err)
return
}
switch msgp.UnsafeString(field) {
case "AuthService":
z.AuthService, bts, err = msgp.ReadStringBytes(bts)
if err != nil {
err = msgp.WrapError(err, "AuthService")
return
}
case "IsDeactivated":
z.IsDeactivated, bts, err = msgp.ReadBoolBytes(bts)
if err != nil {
err = msgp.WrapError(err, "IsDeactivated")
return
}
default:
bts, err = msgp.Skip(bts)
if err != nil {
err = msgp.WrapError(err)
return
}
}
}
o = bts
return
}
// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (z LoginTypeResponse) Msgsize() (s int) {
s = 1 + 12 + msgp.StringPrefixSize + len(z.AuthService) + 14 + msgp.BoolSize
return
}
// DecodeMsg implements msgp.Decodable
func (z *User) DecodeMsg(dc *msgp.Reader) (err error) {
var zb0001 uint32