support

package
v0.0.1-dev-b142f45 Latest Latest
Warning

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

Go to latest
Published: May 6, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultBucket     = "supportfiles"
	DefaultFileDir    = "/var/support"
	DefaultFileTmpDir = "/tmp/support-comment-file"
	Files             = "supportfiles"
	FileDB            = "supportfiles"
	FileReqCollection = "requests"
	ReqTTL            = 3600
)

Variables

This section is empty.

Functions

func GetFileSetSearcher

func GetFileSetSearcher() bleve.Index

func GetLocalFiles

func GetLocalFiles() *sync.Map

func InitFileSearchIndex

func InitFileSearchIndex() error

func SetLocalFile

func SetLocalFile(File File)

Types

type File

type File struct {
	Name        string `json:"name" bson:"name"`
	Group       string `json:"group" bson:"group"`
	Description string `json:"description" bson:"description"`
	Source      `json:"source" bson:"source"`
	SizeMiB     float64            `json:"sizeMiB" bson:"sizeMiB"`
	Url         string             `json:"url" bson:"url"`
	Status      status.SupportFile `json:"status" bson:"status"`
}

func GetLocalFile

func GetLocalFile(name string) File

func ListLocalFiles

func ListLocalFiles() []File

func (*File) Bytes

func (f *File) Bytes() []byte

func (*File) GenTaskUpdate

func (f *File) GenTaskUpdate() File

func (*File) InitCreation

func (f *File) InitCreation(timeLocal string)

func (*File) ObjectKey

func (f *File) ObjectKey() string

func (*File) SetCompleted

func (f *File) SetCompleted()

func (*File) SetError

func (f *File) SetError()

type FileRequest

type FileRequest struct {
	Name        string   `json:"name" bson:"name"`
	Description string   `json:"description" bson:"description"`
	Hosts       []string `json:"hosts"`
	CreatedAt   string   `json:"createdAt" bson:"createdAt"`
}

type FileSet

type FileSet struct {
	Name        string             `json:"name" bson:"name"`
	Description string             `json:"description" bson:"description"`
	Files       []File             `json:"files" bson:"files"`
	SizeMiB     float64            `json:"sizeMiB" bson:"sizeMiB"`
	Status      status.SupportFile `json:"status" bson:"status"`
}

func (*FileSet) IncludeRoles

func (f *FileSet) IncludeRoles(roles []string) bool

type ListFileOptions

type ListFileOptions struct {
	AllNodes bool
	Host     string
}

type Source

type Source struct {
	Role string `json:"role" bson:"role"`
	Host string `json:"host" bson:"host"`
}

Jump to

Keyboard shortcuts

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