github.com/mattermost/mattermost-server/server/v8@v8.0.0-20230610055354-a6d1d38b273d/einterfaces/data_retention.go (about) 1 // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. 2 // See LICENSE.txt for license information. 3 4 package einterfaces 5 6 import ( 7 "github.com/mattermost/mattermost-server/server/public/model" 8 ) 9 10 type DataRetentionInterface interface { 11 GetGlobalPolicy() (*model.GlobalRetentionPolicy, *model.AppError) 12 GetPolicies(offset, limit int) (*model.RetentionPolicyWithTeamAndChannelCountsList, *model.AppError) 13 GetPoliciesCount() (int64, *model.AppError) 14 GetPolicy(policyID string) (*model.RetentionPolicyWithTeamAndChannelCounts, *model.AppError) 15 CreatePolicy(policy *model.RetentionPolicyWithTeamAndChannelIDs) (*model.RetentionPolicyWithTeamAndChannelCounts, *model.AppError) 16 PatchPolicy(patch *model.RetentionPolicyWithTeamAndChannelIDs) (*model.RetentionPolicyWithTeamAndChannelCounts, *model.AppError) 17 DeletePolicy(policyID string) *model.AppError 18 GetTeamsForPolicy(policyID string, offset, limit int) (*model.TeamsWithCount, *model.AppError) 19 AddTeamsToPolicy(policyID string, teamIDs []string) *model.AppError 20 RemoveTeamsFromPolicy(policyID string, teamIDs []string) *model.AppError 21 GetChannelsForPolicy(policyID string, offset, limit int) (*model.ChannelsWithCount, *model.AppError) 22 AddChannelsToPolicy(policyID string, channelIDs []string) *model.AppError 23 RemoveChannelsFromPolicy(policyID string, channelIDs []string) *model.AppError 24 GetTeamPoliciesForUser(userID string, offset, limit int) (*model.RetentionPolicyForTeamList, *model.AppError) 25 GetChannelPoliciesForUser(userID string, offset, limit int) (*model.RetentionPolicyForChannelList, *model.AppError) 26 }