Skip to content

Commit

Permalink
Merge pull request #1093 from flipt-io/gm/authentication-protobuf
Browse files Browse the repository at this point in the history
feat(rpc): define auth protobuf package and Authentication model
  • Loading branch information
GeorgeMac authored Oct 26, 2022
2 parents 56e3241 + 35a71d0 commit 7bed8f3
Show file tree
Hide file tree
Showing 4 changed files with 398 additions and 0 deletions.
5 changes: 5 additions & 0 deletions buf.gen.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
version: v1
plugins:
# core apis
- name: go
out: rpc/flipt
opt:
- paths=source_relative
strategy: all
- name: go-grpc
out: rpc/flipt
opt:
- paths=source_relative
strategy: all
- name: grpc-gateway
out: rpc/flipt
opt:
- paths=source_relative
- grpc_api_configuration=rpc/flipt/flipt.yaml
strategy: all
- name: openapiv2
out: swagger
opt:
- grpc_api_configuration=rpc/flipt/flipt.yaml
strategy: all
287 changes: 287 additions & 0 deletions rpc/flipt/auth/auth.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

46 changes: 46 additions & 0 deletions rpc/flipt/auth/auth.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
syntax = "proto3";

import "google/protobuf/timestamp.proto";
import "protoc-gen-openapiv2/options/annotations.proto";

package flipt.auth;

option go_package = "go.flipt.io/flipt/rpc/flipt/auth";

option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
info: {
title: "Flipt Authentication APIs";
version: "latest";
contact: {
name: "Flipt Team";
url: "https://github.com/flipt-io/flipt";
email: "[email protected]"
};
license: {
name: "MIT License";
url: "https://github.com/flipt-io/flipt/blob/main/rpc/flipt/LICENSE";
};
};
external_docs: {
url: "https://www.flipt.io/docs";
description: "Flipt Docs";
}
schemes: HTTP;
schemes: HTTPS;
consumes: "application/json";
produces: "application/json";
};

enum Method {
NONE = 0;
TOKEN = 1;
}

message Authentication {
string id = 1;
Method method = 2;
google.protobuf.Timestamp expires_at = 3;
google.protobuf.Timestamp created_at = 4;
google.protobuf.Timestamp updated_at = 5;
map<string, string> metadata = 6;
}
Loading

0 comments on commit 7bed8f3

Please sign in to comment.