Skip to content

StardustDL/listat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

listat

CI CD License Listat

Listat is a LIght STATistic service.

API

  • Post / with Statistic body: Create statistic, return id
  • Post /query with StatisticQuery body: Query statistics, return list of statistics
  • Post /count with StatisticQuery body: Query and count statistics, return the number of statistics
  • Get /id: Get statistic by id, return statistic
  • Delete /id: Delete statistic by id, return if done
  • Put /id with Statistic body: Update statistic by id, return if done

Models

type Statistic struct {
	Id               string
	CreationTime     time.Time
	ModificationTime time.Time
	Payload          string
	Uri              string
	Category         string
}

type StatisticQuery struct {
	Id               string
	CreationTime     time.Time
	ModificationTime time.Time
	Payload          string
	Uri              string
	Category         string
	Offset           int
	Limit            int
}

SDK

For C#.

dotnet add package Listat

API:

public interface IListatService
{
    Task<string?> Create(Statistic statistic, CancellationToken cancellationToken = default);

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

    Task<IList<Statistic>> Query(StatisticQuery query, CancellationToken cancellationToken = default);

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

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

    Task<bool> Update(Statistic statistic, CancellationToken cancellationToken = default);
}

Status