StardustDL / loment

Loment is a light comment service.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

loment

CI CD License Loment

Loment is a Light cOmMENT service.

API

  • Post / with Comment body: Create comment, return id
  • Post /query with CommentQuery body: Query comments, return list of comments
    • Post /count with CommentQuery body: Query and count comments, return the number of comments
  • Get /id: Get comment by id, return comment
  • Delete /id: Delete comment by id, return if done
  • Put /id with Comment body: Update comment by id, return if done

Models

type Comment struct {
	Id               string
	CreationTime     time.Time
	ModificationTime time.Time
	Content          string
	Uri              string
	Author           string
	Email            string
	Link             string
	Extra            string
}

type CommentQuery struct {
	Id               string
	CreationTime     time.Time
	ModificationTime time.Time
	Content          string
	Uri              string
	Author           string
	Email            string
	Link             string
	Offset           int
	Limit            int
}

SDK

For C#.

dotnet add package Loment

API:

public interface ILomentService
{
    Task<string?> Create(Comment comment, CancellationToken cancellationToken = default);

    Task<IList<Comment>> Query(CommentQuery query, CancellationToken cancellationToken = default);

    Task<long> Count(CommentQuery query, CancellationToken cancellationToken = default);

    Task<Comment?> Get(string id, CancellationToken cancellationToken = default);

    Task<bool> Delete(string id, CancellationToken cancellationToken = default);

    Task<bool> Update(Comment comment, CancellationToken cancellationToken = default);
}

Status

About

Loment is a light comment service.

License:Apache License 2.0


Languages

Language:Go 43.3%Language:C# 41.0%Language:PowerShell 15.2%Language:Dockerfile 0.5%