usecase

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BadWordsUseCase

type BadWordsUseCase interface {
	GetWord(n int) NxWord
	GetWords() WordList
	CheckWord(word string) Word
	CheckSentence(sentence string) Sentence
	Replacer(sentence string) Replaced
}

func NewBadWordsUseCase

func NewBadWordsUseCase() BadWordsUseCase

type NxWord added in v1.0.1

type NxWord struct {
	Status int      `json:"status"`
	Error  string   `json:"error"`
	Words  []string `json:"word"`
}

type Replaced added in v1.0.1

type Replaced struct {
	Status   int      `json:"status"`
	Sentence string   `json:"sentence"`
	Count    int      `json:"count"`
	BadWords []string `json:"badWords"`
	Replaced string   `json:"replaced"`
}

type Sentence

type Sentence struct {
	Status   int    `json:"status"`
	Sentence string `json:"sentence"`
	Count    int    `json:"count"`
	BadWords []string
}

type Word

type Word struct {
	Status int    `json:"status"`
	Word   string `json:"word"`
	IsBad  bool   `json:"isBad"`
}

type WordList

type WordList struct {
	Status int      `json:"status"`
	Count  int      `json:"count"`
	Words  []string `json:"words"`
}

Jump to

Keyboard shortcuts

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