service

package
v0.0.0-...-0b03116 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	Username string
	Password string
	Salt     string
}

type AuthService

type AuthService struct{}

func NewAuthService

func NewAuthService() *AuthService

func (*AuthService) Create

func (s *AuthService) Create(data *Account) error

func (*AuthService) Delete

func (s *AuthService) Delete(username string) error

func (*AuthService) Read

func (s *AuthService) Read(username string) (*Account, error)

func (*AuthService) Token

func (s *AuthService) Token(username, password string) string

func (*AuthService) Update

func (s *AuthService) Update(username, password string) error

func (*AuthService) Verify

func (s *AuthService) Verify(username, password string) (bool, error)

func (*AuthService) VerifyToken

func (s *AuthService) VerifyToken(username, encryptPw string) (bool, error)

type DirEntry

type DirEntry struct {
	Name     string `json:"name"`
	Path     string `json:"path"`
	Date     int64  `json:"date"`
	FileSize uint64 `json:"file_size"`
	IsDir    bool   `json:"is_dir"`
}

type PrivDir

type PrivDir struct {
	Id      string `json:"id"`
	DirName string `json:"dirname"`
	Owner   string `json:"owner"`
}

type PrivDirService

type PrivDirService struct {
	// contains filtered or unexported fields
}

func NewPrivDirService

func NewPrivDirService(acc *Account) *PrivDirService

func (*PrivDirService) Create

func (sv *PrivDirService) Create(dirname string) (string, error)

func (*PrivDirService) Delete

func (sv *PrivDirService) Delete(dirname string) error

func (*PrivDirService) Query

func (sv *PrivDirService) Query() []PrivDir

func (*PrivDirService) QueryUser

func (sv *PrivDirService) QueryUser() []PrivDir

func (*PrivDirService) Read

func (sv *PrivDirService) Read(dirname string) (*PrivDir, error)

type Version

type Version struct {
	Version string `json:"version"`
	Branch  string `json:"branch"`
	Hash    string `json:"hash"`
}

func NewVersion

func NewVersion(version, branch, hash string) *Version

func (*Version) String

func (v *Version) String() string

type WorkerService

type WorkerService struct{}

func NewWorkerService

func NewWorkerService() *WorkerService

func (*WorkerService) Read

func (sv *WorkerService) Read(path string) (*DirEntry, error)

Jump to

Keyboard shortcuts

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