lla_plugin_interface 0.5.3

Interface for lla plugins
Documentation
syntax = "proto3";

package lla_plugin;

message EntryMetadata {
    uint64 size = 1;
    uint64 modified = 2;
    uint64 accessed = 3;
    uint64 created = 4;
    bool is_dir = 5;
    bool is_file = 6;
    bool is_symlink = 7;
    uint32 permissions = 8;
    uint32 uid = 9;
    uint32 gid = 10;
}

message DecoratedEntry {
    string path = 1;
    EntryMetadata metadata = 2;
    map<string, string> custom_fields = 3;
}

message PluginMessage {
    oneof message {
        bool get_name = 1;
        bool get_version = 2;
        bool get_description = 3;
        bool get_supported_formats = 4;
        DecoratedEntry decorate = 5;
        FormatFieldRequest format_field = 6;
        ActionRequest action = 7;
        bool list_actions = 8;
        string name_response = 101;
        string version_response = 102;
        string description_response = 103;
        SupportedFormatsResponse formats_response = 104;
        DecoratedEntry decorated_response = 105;
        FormattedFieldResponse field_response = 106;
        ActionResponse action_response = 107;
        string error_response = 108;
        ListActionsResponse list_actions_response = 109;
    }
}

message FormatFieldRequest {
    DecoratedEntry entry = 1;
    string format = 2;
}

message ActionRequest {
    string action = 1;
    repeated string args = 2;
}

message SupportedFormatsResponse {
    repeated string formats = 1;
}

message FormattedFieldResponse {
    optional string field = 1;
}

message ActionResponse {
    bool success = 1;
    optional string error = 2;
}

message ActionInfo {
    string name = 1;
    string usage = 2;
    string description = 3;
    repeated string examples = 4;
}

message ListActionsResponse {
    repeated ActionInfo actions = 1;
}