app/docs/en/dev/api/liteyuki/plugin/model.md

90 lines
1.2 KiB
Markdown
Raw Normal View History

2024-08-19 09:43:46 +08:00
---
title: liteyuki.plugin.model
order: 1
icon: laptop-code
category: API
---
### ***class*** `PluginType(Enum)`
插件类型枚举值
2024-08-19 09:55:47 +08:00
###   ***attr*** `APPLICATION: 'application'`
2024-08-19 09:43:46 +08:00
2024-08-19 09:55:47 +08:00
###   ***attr*** `SERVICE: 'service'`
2024-08-19 09:43:46 +08:00
2024-08-19 09:55:47 +08:00
###   ***attr*** `IMPLEMENTATION: 'implementation'`
2024-08-19 09:43:46 +08:00
2024-08-19 09:55:47 +08:00
###   ***attr*** `MODULE: 'module'`
2024-08-19 09:43:46 +08:00
2024-08-19 09:55:47 +08:00
###   ***attr*** `UNCLASSIFIED: 'unclassified'`
2024-08-19 09:43:46 +08:00
### ***class*** `PluginMetadata(BaseModel)`
轻雪插件元数据由插件编写者提供name为必填项
2024-08-19 09:55:47 +08:00
2024-08-19 09:43:46 +08:00
Attributes:
2024-08-19 09:55:47 +08:00
2024-08-19 09:43:46 +08:00
----------
2024-08-19 09:55:47 +08:00
2024-08-19 09:43:46 +08:00
name: str
2024-08-19 09:55:47 +08:00
2024-08-19 09:43:46 +08:00
插件名称
2024-08-19 09:55:47 +08:00
2024-08-19 09:43:46 +08:00
description: str
2024-08-19 09:55:47 +08:00
2024-08-19 09:43:46 +08:00
插件描述
2024-08-19 09:55:47 +08:00
2024-08-19 09:43:46 +08:00
usage: str
2024-08-19 09:55:47 +08:00
2024-08-19 09:43:46 +08:00
插件使用方法
2024-08-19 09:55:47 +08:00
2024-08-19 09:43:46 +08:00
type: str
2024-08-19 09:55:47 +08:00
2024-08-19 09:43:46 +08:00
插件类型
2024-08-19 09:55:47 +08:00
2024-08-19 09:43:46 +08:00
author: str
2024-08-19 09:55:47 +08:00
2024-08-19 09:43:46 +08:00
插件作者
2024-08-19 09:55:47 +08:00
2024-08-19 09:43:46 +08:00
homepage: str
2024-08-19 09:55:47 +08:00
2024-08-19 09:43:46 +08:00
插件主页
2024-08-19 09:55:47 +08:00
2024-08-19 09:43:46 +08:00
extra: dict[str, Any]
2024-08-19 09:55:47 +08:00
2024-08-19 09:43:46 +08:00
额外信息
### ***class*** `Plugin(BaseModel)`
存储插件信息
2024-08-19 09:55:47 +08:00
###   ***attr*** `model_config: {'arbitrary_types_allowed': True}`
2024-08-19 09:43:46 +08:00
### ***var*** `APPLICATION = 'application'`
### ***var*** `SERVICE = 'service'`
### ***var*** `IMPLEMENTATION = 'implementation'`
### ***var*** `MODULE = 'module'`
### ***var*** `UNCLASSIFIED = 'unclassified'`
### ***var*** `model_config = {'arbitrary_types_allowed': True}`