All Projects → einride → aip-go

einride / aip-go

Licence: MIT License
Go SDK for implementing resource-oriented gRPC APIs.

Programming Languages

go
31211 projects - #10 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to aip-go

protop
protobufs, packaged. https://protop.io
Stars: ✭ 68 (+44.68%)
Mutual labels:  protocol-buffers, grpc, protobufs
Go Grpc Examples
This repo contains examples and implementations of different types of GRPC services and APIs using Golang.
Stars: ✭ 180 (+282.98%)
Mutual labels:  protocol-buffers, grpc
Evans
Evans: more expressive universal gRPC client
Stars: ✭ 2,710 (+5665.96%)
Mutual labels:  protocol-buffers, grpc
Gloo
The Feature-rich, Kubernetes-native, Next-Generation API Gateway Built on Envoy
Stars: ✭ 3,219 (+6748.94%)
Mutual labels:  api-management, grpc
Go Micro Boilerplate
The boilerplate of the GoLang application with a clear microservices architecture.
Stars: ✭ 147 (+212.77%)
Mutual labels:  protocol-buffers, grpc
Protodep
Collect necessary .proto files (Protocol Buffers IDL) and manage dependencies
Stars: ✭ 167 (+255.32%)
Mutual labels:  protocol-buffers, grpc
Mu Haskell
Mu (μ) is a purely functional framework for building micro services.
Stars: ✭ 215 (+357.45%)
Mutual labels:  protocol-buffers, grpc
Protoc Gen Struct Transformer
Transformation functions generator for Protocol Buffers.
Stars: ✭ 105 (+123.4%)
Mutual labels:  protocol-buffers, grpc
protoc-plugin
A protoc compiler plugin for Clojure applications
Stars: ✭ 28 (-40.43%)
Mutual labels:  protocol-buffers, grpc
grpc-graphql-gateway
A protoc plugin that generates graphql execution code from Protocol Buffers.
Stars: ✭ 239 (+408.51%)
Mutual labels:  protocol-buffers, grpc
agentgo
Hi! Agentgo is a tool for making remote command executions from server to client with golang, protocol buffers (protobuf) and grpc.
Stars: ✭ 15 (-68.09%)
Mutual labels:  protocol-buffers, grpc
Protoeasy Go
Simpler usage of protoc. Deprecated.
Stars: ✭ 129 (+174.47%)
Mutual labels:  protocol-buffers, grpc
Go Proto Gql
Protobuff plugins for generating graphql schema and golang to graphql bindings. Also supports a graphql gateway (Alpha)
Stars: ✭ 127 (+170.21%)
Mutual labels:  protocol-buffers, grpc
Buf
A new way of working with Protocol Buffers.
Stars: ✭ 3,328 (+6980.85%)
Mutual labels:  protocol-buffers, grpc
Protodot
transforming your .proto files into .dot files (and .svg, .png if you happen to have graphviz installed)
Stars: ✭ 107 (+127.66%)
Mutual labels:  protocol-buffers, grpc
Rules protobuf
Bazel rules for building protocol buffers and gRPC services (java, c++, go, ...)
Stars: ✭ 206 (+338.3%)
Mutual labels:  protocol-buffers, grpc
Google Assistant Java Demo
A simple Google Assistant Client in Java
Stars: ✭ 53 (+12.77%)
Mutual labels:  protocol-buffers, grpc
Grpc Swift
The Swift language implementation of gRPC.
Stars: ✭ 1,270 (+2602.13%)
Mutual labels:  protocol-buffers, grpc
Tyk
Tyk Open Source API Gateway written in Go, supporting REST, GraphQL, TCP and gRPC protocols
Stars: ✭ 6,968 (+14725.53%)
Mutual labels:  api-management, grpc
grpc-chat
Simple Chat Server/Client implemented with gRPC
Stars: ✭ 107 (+127.66%)
Mutual labels:  protocol-buffers, grpc

AIP Go

Go SDK for implementing Google API Improvement Proposals (AIP).

Documentation

See https://aip.dev for the full AIP documentation.

Installing

$ go get -u go.einride.tech/aip

Examples

AIP-132 (Standard method: List)

  • Use pagination.PageToken to implement offset-based pagination.

    package examplelibrary
    
    import (
    	"context"
    
    	"go.einride.tech/aip/pagination"
    	"google.golang.org/genproto/googleapis/example/library/v1"
    	"google.golang.org/grpc/codes"
    	"google.golang.org/grpc/status"
    )
    
    func (s *Server) ListShelves(
    	ctx context.Context,
    	request *library.ListShelvesRequest,
    ) (*library.ListShelvesResponse, error) {
    	// Handle request constraints.
    	const (
    		maxPageSize     = 1000
    		defaultPageSize = 100
    	)
    	switch {
    	case request.PageSize < 0:
    		return nil, status.Errorf(codes.InvalidArgument, "page size is negative")
    	case request.PageSize == 0:
    		request.PageSize = defaultPageSize
    	case request.PageSize > maxPageSize:
    		request.PageSize = maxPageSize
    	}
    	// Use pagination.PageToken for offset-based page tokens.
    	pageToken, err := pagination.ParsePageToken(request)
    	if err != nil {
    		return nil, status.Errorf(codes.InvalidArgument, "invalid page token")
    	}
    	// Query the storage.
    	result, err := s.Storage.ListShelves(ctx, &ListShelvesQuery{
    		Offset:   pageToken.Offset,
    		PageSize: request.GetPageSize(),
    	})
    	if err != nil {
    		return nil, err
    	}
    	// Build the response.
    	response := &library.ListShelvesResponse{
    		Shelves: result.Shelves,
    	}
    	// Set the next page token.
    	if result.HasNextPage {
    		response.NextPageToken = pageToken.Next(request).String()
    	}
    	// Respond.
    	return response, nil
    }
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].