Command
使用-h
获取更多帮助
Karlin Framework [Version: 1.1.1]
Usage:
karlin [flags]
karlin [command]
Available Commands:
completion generate the autocompletion script for the specified shell
help Help about any command
operator Do operation with operators and exit
version Print version and exit
Flags:
-c, --config string config file path (default "pkg/config/server.yaml")
-h, --help help for karlin
Use "karlin [command] --help" for more information about a command.
[danger] 注意
初次使用时将根据/backend/server/pkg/config/server.yaml的配置新建默认用户并创建数据库
请于此处修改默认配置:
server:
host: 127.0.0.1
file:
port: 9000
pattern: /files/downloads/
db:
name: team.db
root: Lockly
passwd: 3ty1r86bn
如需针对用户进行操作可以使用operator
命令:
Lockly@BK ❯ go run main.go operator --help
This command allows you to perform operations like adding, deleting, or modifying operators.
Usage:
karlin operator [flags]
karlin operator [command]
Available Commands:
add Add a new operator
delete Delete an existing operator
modify Modify an existing operator
Flags:
-h, --help help for operator
Use "karlin operator [command] --help" for more information about a command.
Lockly@BK ❯ go run main.go operator delete
? Username: Test
? Username: Test
Delete Operator Success
Lockly@BK ❯ go run main.go operator add
? Username: Agony
? Username: Agony
? Password: ********
? Password Again: ********
Add Operator Success
Lockly@BK ❯ go run main.go operator modify
? Username: Agony
? Username: Agony
? Password: ********
? Password Again: ********
Modify Operator Success