Christopher James Hayward
1 year ago
10 changed files with 285 additions and 50 deletions
-
13buf.gen.yaml
-
8buf.lock
-
9buf.yaml
-
72cmd/server/main.go
-
29flake.nix
-
14go.mod
-
32go.sum
-
2proto/users.pb.go
-
154proto/users.swagger.json
-
2proto/users_grpc.pb.go
@ -0,0 +1,13 @@ |
|||
version: v1 |
|||
plugins: |
|||
- name : go |
|||
out: . |
|||
opt: paths=source_relative |
|||
- name: go-grpc |
|||
out: . |
|||
opt: paths=source_relative |
|||
- name: grpc-gateway |
|||
out: . |
|||
opt: paths=source_relative |
|||
- name: openapiv2 |
|||
out: . |
@ -0,0 +1,8 @@ |
|||
# Generated by buf. DO NOT EDIT. |
|||
version: v1 |
|||
deps: |
|||
- remote: buf.build |
|||
owner: googleapis |
|||
repository: googleapis |
|||
commit: 711e289f6a384c4caeebaff7c6931ade |
|||
digest: shake256:e08fb55dad7469f69df00304eed31427d2d1576e9aab31e6bf86642688e04caaf0372f15fe6974cf79432779a635b3ea401ca69c943976dc42749524e4c25d94 |
@ -0,0 +1,9 @@ |
|||
version: v1 |
|||
deps: |
|||
- buf.build/googleapis/googleapis |
|||
breaking: |
|||
use: |
|||
- FILE |
|||
lint: |
|||
use: |
|||
- DEFAULT |
@ -0,0 +1,154 @@ |
|||
{ |
|||
"swagger": "2.0", |
|||
"info": { |
|||
"title": "proto/users.proto", |
|||
"version": "version not set" |
|||
}, |
|||
"tags": [ |
|||
{ |
|||
"name": "Users" |
|||
} |
|||
], |
|||
"consumes": [ |
|||
"application/json" |
|||
], |
|||
"produces": [ |
|||
"application/json" |
|||
], |
|||
"paths": {}, |
|||
"definitions": { |
|||
"protobufAny": { |
|||
"type": "object", |
|||
"properties": { |
|||
"@type": { |
|||
"type": "string" |
|||
} |
|||
}, |
|||
"additionalProperties": {} |
|||
}, |
|||
"rpcStatus": { |
|||
"type": "object", |
|||
"properties": { |
|||
"code": { |
|||
"type": "integer", |
|||
"format": "int32" |
|||
}, |
|||
"message": { |
|||
"type": "string" |
|||
}, |
|||
"details": { |
|||
"type": "array", |
|||
"items": { |
|||
"type": "object", |
|||
"$ref": "#/definitions/protobufAny" |
|||
} |
|||
} |
|||
} |
|||
}, |
|||
"usersAuthorizeResponse": { |
|||
"type": "object", |
|||
"properties": { |
|||
"user": { |
|||
"$ref": "#/definitions/usersUserInfo" |
|||
}, |
|||
"roles": { |
|||
"type": "array", |
|||
"items": { |
|||
"type": "object", |
|||
"$ref": "#/definitions/usersUserRole" |
|||
} |
|||
} |
|||
} |
|||
}, |
|||
"usersChangePasswordResponse": { |
|||
"type": "object" |
|||
}, |
|||
"usersListRolesResponse": { |
|||
"type": "object", |
|||
"properties": { |
|||
"roles": { |
|||
"type": "array", |
|||
"items": { |
|||
"type": "object", |
|||
"$ref": "#/definitions/usersUserRole" |
|||
} |
|||
} |
|||
} |
|||
}, |
|||
"usersLoginResponse": { |
|||
"type": "object", |
|||
"properties": { |
|||
"token": { |
|||
"$ref": "#/definitions/usersUserToken" |
|||
} |
|||
} |
|||
}, |
|||
"usersLogoutResponse": { |
|||
"type": "object" |
|||
}, |
|||
"usersRegisterResponse": { |
|||
"type": "object" |
|||
}, |
|||
"usersResetPasswordResponse": { |
|||
"type": "object", |
|||
"properties": { |
|||
"token": { |
|||
"$ref": "#/definitions/usersUserToken" |
|||
} |
|||
} |
|||
}, |
|||
"usersSetRolesResponse": { |
|||
"type": "object" |
|||
}, |
|||
"usersUserForm": { |
|||
"type": "object", |
|||
"properties": { |
|||
"email": { |
|||
"type": "string" |
|||
}, |
|||
"password": { |
|||
"type": "string" |
|||
}, |
|||
"passwordAgain": { |
|||
"type": "string" |
|||
} |
|||
} |
|||
}, |
|||
"usersUserInfo": { |
|||
"type": "object", |
|||
"properties": { |
|||
"id": { |
|||
"type": "string", |
|||
"format": "int64" |
|||
}, |
|||
"uuid": { |
|||
"type": "string" |
|||
} |
|||
} |
|||
}, |
|||
"usersUserRole": { |
|||
"type": "object", |
|||
"properties": { |
|||
"id": { |
|||
"type": "string", |
|||
"format": "int64" |
|||
}, |
|||
"name": { |
|||
"type": "string" |
|||
} |
|||
} |
|||
}, |
|||
"usersUserToken": { |
|||
"type": "object", |
|||
"properties": { |
|||
"token": { |
|||
"type": "string" |
|||
}, |
|||
"expires": { |
|||
"type": "string", |
|||
"format": "int64" |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue