diff --git a/app/platform/config.go b/app/platform/config.go new file mode 100644 index 0000000000..2713166849 --- /dev/null +++ b/app/platform/config.go @@ -0,0 +1,16 @@ +// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. +// See LICENSE.txt for license information. + +package platform + +// ServiceConfig is used to initialize the PlatformService. +// The mandatory fields will be checked during the initialization of the service. +type ServiceConfig struct { + // Mandatory fields + // Optional fields +} + +func (c *ServiceConfig) validate() error { + // Mandatory fields need to be checked here + return nil +} diff --git a/app/platform/service.go b/app/platform/service.go new file mode 100644 index 0000000000..a9eda866f7 --- /dev/null +++ b/app/platform/service.go @@ -0,0 +1,19 @@ +// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. +// See LICENSE.txt for license information. + +package platform + +// PlatformService is the service for the platform related tasks. It is +// responsible for non-entity related functionalities that are required +// by a product such as database access, configuration access, licensing etc. +type PlatformService struct { +} + +// New creates a new PlatformService. +func New(c ServiceConfig) (*PlatformService, error) { + if err := c.validate(); err != nil { + return nil, err + } + + return &PlatformService{}, nil +}