-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Plugins: API Documentations & Cleanup
* Document all modules and types in the public API of the plugins_api crate * Small improvements for the wit files. * Fix warnings in bytesource tests.
- Loading branch information
1 parent
f7cdab4
commit 2eac9b0
Showing
12 changed files
with
62 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
application/apps/indexer/plugins_api/wit/v0.1.0/deps/bytesource/bytesource.wit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 8 additions & 1 deletion
9
application/apps/indexer/plugins_api/wit/v0.1.0/deps/bytesource/types.wit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,30 @@ | ||
package chipmunk:bytesource@0.1.0; | ||
|
||
/// Contains the types definitions used for the development of byte-source plugins. | ||
interface bytesource-types { | ||
use chipmunk:shared/logging@0.1.0.{level}; | ||
|
||
/// Represents the addresses defining a network socket | ||
record socket-info { | ||
/// The IP of the socket info represented as string. | ||
ip: string, | ||
/// The port of the socket info represented as 16 bits unsigned integer. | ||
port: u16, | ||
} | ||
|
||
/// Represents the errors while reading bytes in bytesource plugin | ||
variant source-error { | ||
/// Errors happened around IO operations. | ||
io(string), | ||
unsupported, | ||
/// Errors represents an unsupported interface by the plugin. | ||
unsupported(string), | ||
/// Other kind of errors with custom string message. | ||
other(string), | ||
} | ||
|
||
/// General configurations related to all bytesources | ||
record source-config { | ||
/// Represent the current log level running in Chipmunk app. | ||
log-level: level, | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
application/apps/indexer/plugins_api/wit/v0.1.0/deps/bytesource/world.wit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
application/apps/indexer/plugins_api/wit/v0.1.0/deps/parser/parser.wit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
application/apps/indexer/plugins_api/wit/v0.1.0/deps/parser/types.wit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
application/apps/indexer/plugins_api/wit/v0.1.0/deps/parser/world.wit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,12 +3,17 @@ package chipmunk:[email protected]; | |
/// Logging definitions and methods for all plugins | ||
interface logging { | ||
|
||
/// Log Level | ||
/// The definitions of the log Level | ||
enum level { | ||
/// Represents error log level | ||
error, | ||
/// Represents warn log level | ||
warn, | ||
/// Represents info log level | ||
info, | ||
/// Represents debug log level | ||
debug, | ||
/// Represents trace log level | ||
trace, | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
application/apps/indexer/plugins_api/wit/v0.1.0/deps/shared/world.wit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
package chipmunk:plugins; | ||
|
||
world imports { | ||
include chipmunk:shared/bindings@0.1.0; | ||
} | ||
// This file used as the top of the plugins packages and used only as the place | ||
// where `generate!()` macro needs to point to, in order to resolve the relation | ||
// between the packages. | ||
|
||
world bindings { | ||
include imports; | ||
include chipmunk:shared/bindings@0.1.0; | ||
} |