github.com/ashishbhate/mattermost-server@v5.11.1+incompatible/utils/testutils/static_config_service.go (about) 1 // Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved. 2 // See License.txt for license information. 3 4 package testutils 5 6 import ( 7 "crypto/ecdsa" 8 9 "github.com/mattermost/mattermost-server/model" 10 ) 11 12 type StaticConfigService struct { 13 Cfg *model.Config 14 } 15 16 func (s StaticConfigService) Config() *model.Config { 17 return s.Cfg 18 } 19 20 func (StaticConfigService) AddConfigListener(func(old, current *model.Config)) string { 21 return "" 22 } 23 24 func (StaticConfigService) RemoveConfigListener(string) { 25 26 } 27 28 func (StaticConfigService) AsymmetricSigningKey() *ecdsa.PrivateKey { 29 return &ecdsa.PrivateKey{} 30 } 31 func (StaticConfigService) PostActionCookieSecret() []byte { 32 return make([]byte, 32) 33 }