todolist

package module
v0.0.0-...-65b0565 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 11, 2024 License: BSD-3-Clause Imports: 10 Imported by: 0

README

todo-list-service

Latest release Build status Image size Go Report Card

Service todo-list-service is an example todo-list service written in Go, exposing a gRPC API using connectrpc. It uses a PostgreSQL database to store/retrieve the todo-list items.

Due to limited time available for this assignment, the service is kept simple and is not feature complete.

Run and test

Build and run the service using task run. Then use the test-client to make gRPC API calls to the backend.

task run
task tc -- GetLists

Assignment

Create a Todo List service in Golang. The service should expose an API to allow for (fictional) frontend code to connect. Frontend is not required in this assignment. The service should have the commonly expected features like due date, labels and comments. Consider what other additional features would be useful to have.

The service would be deployed in a cloud environment. Create a deployment strategy and optionally include Docker deployment manifests for this service.

Created with

License

Copyright © 2024 Roel Schut. All rights reserved.

This project is governed by a BSD-style license that can be found in the LICENSE file.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBServiceHandler

type DBServiceHandler struct {
	// contains filtered or unexported fields
}

func (*DBServiceHandler) AddTask

func (svc *DBServiceHandler) AddTask(ctx context.Context, req *connect.Request[apiv1.AddTaskRequest]) (*connect.Response[apiv1.AddTaskResponse], error)

func (*DBServiceHandler) Close

func (svc *DBServiceHandler) Close() error

func (*DBServiceHandler) CloseTask

func (svc *DBServiceHandler) CloseTask(ctx context.Context, req *connect.Request[apiv1.TaskRequest]) (*connect.Response[apiv1.CloseTaskResponse], error)

func (*DBServiceHandler) CreateList

func (svc *DBServiceHandler) CreateList(ctx context.Context, req *connect.Request[apiv1.CreateListRequest]) (*connect.Response[apiv1.CreateListResponse], error)

func (*DBServiceHandler) DeleteList

func (svc *DBServiceHandler) DeleteList(ctx context.Context, req *connect.Request[apiv1.DeleteListRequest]) (*connect.Response[apiv1.DeleteListResponse], error)

func (*DBServiceHandler) DeleteTask

func (svc *DBServiceHandler) DeleteTask(ctx context.Context, req *connect.Request[apiv1.TaskRequest]) (*connect.Response[apiv1.DeleteTaskResponse], error)

func (*DBServiceHandler) GetList

func (svc *DBServiceHandler) GetList(ctx context.Context, req *connect.Request[apiv1.GetListRequest]) (*connect.Response[apiv1.GetListResponse], error)

func (*DBServiceHandler) GetLists

func (svc *DBServiceHandler) GetLists(ctx context.Context, req *connect.Request[apiv1.GetListsRequest]) (_ *connect.Response[apiv1.GetListsResponse], err error)

func (*DBServiceHandler) GetTask

func (svc *DBServiceHandler) GetTask(ctx context.Context, req *connect.Request[apiv1.TaskRequest]) (*connect.Response[apiv1.GetTaskResponse], error)

func (*DBServiceHandler) GetTasks

func (svc *DBServiceHandler) GetTasks(ctx context.Context, req *connect.Request[apiv1.GetTasksRequest]) (*connect.Response[apiv1.GetTasksResponse], error)

type ServiceHandler

func NewDBServiceHandler

func NewDBServiceHandler(db *sqlx.DB, tp trace.TracerProvider) ServiceHandler

Directories

Path Synopsis
api
v1
cmd
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL