mirror of
https://github.com/usememos/memos.git
synced 2024-11-16 11:46:07 +08:00
4d41b68d4c
* feat: implmented link previews (proto files) * fix: passing proto linter errors * chore: renamed MetadataService service in proto file. * fix: removed unused files * chore: removed meaningless comments from proto file
28 lines
510 B
Protocol Buffer
28 lines
510 B
Protocol Buffer
syntax = "proto3";
|
|
|
|
package memos.api.v2;
|
|
|
|
import "google/api/annotations.proto";
|
|
|
|
option go_package = "gen/api/v2";
|
|
|
|
service LinkService {
|
|
rpc GetLinkMetadata(GetLinkMetadataRequest) returns (GetLinkMetadataResponse) {
|
|
option (google.api.http) = {get: "/api/v2/metadata"};
|
|
}
|
|
}
|
|
|
|
// Metadata message
|
|
message Metadata {
|
|
string title = 1;
|
|
string description = 2;
|
|
string image = 3;
|
|
}
|
|
|
|
message GetLinkMetadataRequest {
|
|
string url = 1;
|
|
}
|
|
|
|
message GetLinkMetadataResponse {
|
|
Metadata metadata = 1;
|
|
}
|