validators

package
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 16, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MattermostValidator

type MattermostValidator struct {
}

MattermostValidator is a type that provides validation functionality for Mattermost data archives.

func NewMattermostValidator

func NewMattermostValidator() *MattermostValidator

NewMattermostValidator returns a validator for mattermost archive types

func (*MattermostValidator) Validate

func (v *MattermostValidator) Validate(archiveName string) error

Validate checks the validity of a Mattermost data archive. It uses the mmctl tool's validation process, ensuring the archive is correctly formatted and structured.

type SlackValidator

type SlackValidator struct{}

SlackValidator is a type that provides validation functionality for Slack data archives.

func NewSlackValidator

func NewSlackValidator() *SlackValidator

NewSlackValidator returns a validator for slack archive types

func (*SlackValidator) Validate

func (v *SlackValidator) Validate(archiveName string) error

Validate checks the validity of a Slack data archive. Currently, it does not perform any checks and always returns nil (no error).

type Validator

type Validator interface {
	Validate(archiveName string) error
}

Validator defines an interface for validating data archives.

func NewValidator

func NewValidator(archiveType model.BackupType) (Validator, error)

NewValidator creates a new validator based on the specified archive type. It supports different archive types, such as Mattermost and Slack. Returns the appropriate validator or an error if the archive type is unsupported.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL