diff --git a/.woodpecker/dart-generate.yaml b/.woodpecker/dart-generate.yaml new file mode 100644 index 0000000..f27529f --- /dev/null +++ b/.woodpecker/dart-generate.yaml @@ -0,0 +1,41 @@ +--- +when: + event: + - push + +steps: + - name: Clone dart repo + image: alpine + environment: + GITEA_USER: devops-bot + GITEA_TOKEN: + from_secret: gitea_repo_access + commands: + - apk update && apk add git + - git clone https://$GITEA_USER:$GITEA_TOKEN@gitea.badhouseplants.net/softplayer/softplayer-dart-proto.git target + - git -C ./target config user.name "devops-bot" + - git -C ./target config user.email "bot@badhouseplants.net" + - git -C ./target checkout $CI_COMMIT_BRANCH || git -C ./target checkout -b $CI_COMMIT_BRANCH + - name: Generate go code + image: bufbuild/buf + commands: + - buf generate + - rm -rf ./target/lib/src + - mkdir -p ./target/lib/src + - cp -r ./gen/dart/* ./target/ + - name: Push the typescrip repo + image: alpine + environment: + GITEA_USER: devops-bot + GITEA_TOKEN: + from_secret: gitea_repo_access + commands: + - apk update && apk add git + - git -C ./target add . + - |- + git -C ./target commit --allow-empty \ + -m "Update protobuf definitions: ${CI_COMMIT_SHA:0:8}" \ + -m "By ${CI_COMMIT_AUTHOR}" \ + -m "Commit link: ${CI_REPO_URL}/commit/${CI_COMMIT_SHA}" \ + -m "Pipeline link: ${CI_PIPELINE_URL}" + - git -C ./target push --set-upstream origin $CI_COMMIT_BRANCH diff --git a/README.md b/README.md index 13a6796..9f7a2c9 100644 --- a/README.md +++ b/README.md @@ -4,16 +4,16 @@ ## Table of Contents - [accounts/v1/accounts_v1.proto](#accounts_v1_accounts_v1-proto) - - [AccountData](#accounts-AccountData) - - [AccountFull](#accounts-AccountFull) - - [AccountFullWithToken](#accounts-AccountFullWithToken) - - [AccountId](#accounts-AccountId) - - [AccountPassword](#accounts-AccountPassword) - - [AccountWithPassword](#accounts-AccountWithPassword) - - [AccountWithPasswordAndCode](#accounts-AccountWithPasswordAndCode) - - [EmailVerified](#accounts-EmailVerified) + - [AccountData](#accounts-v1-AccountData) + - [AccountPassword](#accounts-v1-AccountPassword) + - [IsEmailVerifiedRequest](#accounts-v1-IsEmailVerifiedRequest) + - [IsEmailVerifiedResponse](#accounts-v1-IsEmailVerifiedResponse) + - [NewPasswordRequest](#accounts-v1-NewPasswordRequest) + - [ResetPasswordRequest](#accounts-v1-ResetPasswordRequest) + - [SignInRequest](#accounts-v1-SignInRequest) + - [SignUpRequest](#accounts-v1-SignUpRequest) - - [Accounts](#accounts-Accounts) + - [AccountsService](#accounts-v1-AccountsService) - [applications/v1/applications_v1.proto](#applications_v1_applications_v1-proto) - [ApplicationFull](#applications-ApplicationFull) @@ -76,7 +76,7 @@ This file has messages for describing environments - + ### AccountData @@ -92,55 +92,7 @@ This file has messages for describing environments - - -### AccountFull - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| id | [AccountId](#accounts-AccountId) | | | -| data | [AccountData](#accounts-AccountData) | | | - - - - - - - - -### AccountFullWithToken - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| id | [AccountId](#accounts-AccountId) | | | -| data | [AccountData](#accounts-AccountData) | | | -| token | [string](#string) | | | - - - - - - - - -### AccountId -Represents a environment UUID only - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| id | [string](#string) | | Contour ID: UUID | - - - - - - - + ### AccountPassword @@ -155,42 +107,24 @@ Represents a environment UUID only - + -### AccountWithPassword +### IsEmailVerifiedRequest | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| data | [AccountData](#accounts-AccountData) | | | -| password | [AccountPassword](#accounts-AccountPassword) | | | +| data | [AccountData](#accounts-v1-AccountData) | | | - + -### AccountWithPasswordAndCode - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| data | [AccountData](#accounts-AccountData) | | | -| password | [AccountPassword](#accounts-AccountPassword) | | | -| code | [string](#string) | | | - - - - - - - - -### EmailVerified +### IsEmailVerifiedResponse @@ -202,6 +136,70 @@ Represents a environment UUID only + + + +### NewPasswordRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| data | [AccountData](#accounts-v1-AccountData) | | | +| password | [AccountPassword](#accounts-v1-AccountPassword) | | | +| code | [string](#string) | | | + + + + + + + + +### ResetPasswordRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| data | [AccountData](#accounts-v1-AccountData) | | | + + + + + + + + +### SignInRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| data | [AccountData](#accounts-v1-AccountData) | | | +| password | [AccountPassword](#accounts-v1-AccountPassword) | | | + + + + + + + + +### SignUpRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| data | [AccountData](#accounts-v1-AccountData) | | | +| password | [AccountPassword](#accounts-v1-AccountPassword) | | | + + + + + @@ -209,18 +207,18 @@ Represents a environment UUID only - + -### Accounts +### AccountsService Service for handling environments | Method Name | Request Type | Response Type | Description | | ----------- | ------------ | ------------- | ------------| -| SignUp | [AccountWithPassword](#accounts-AccountWithPassword) | [AccountFullWithToken](#accounts-AccountFullWithToken) | | -| SignIn | [AccountWithPassword](#accounts-AccountWithPassword) | [AccountFullWithToken](#accounts-AccountFullWithToken) | | -| ResetPassword | [AccountData](#accounts-AccountData) | [.google.protobuf.Empty](#google-protobuf-Empty) | | -| NewPassword | [AccountWithPasswordAndCode](#accounts-AccountWithPasswordAndCode) | [.google.protobuf.Empty](#google-protobuf-Empty) | | -| IsEmailVerified | [AccountData](#accounts-AccountData) | [EmailVerified](#accounts-EmailVerified) | | +| SignUp | [SignUpRequest](#accounts-v1-SignUpRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | | +| SignIn | [SignInRequest](#accounts-v1-SignInRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | | +| ResetPassword | [ResetPasswordRequest](#accounts-v1-ResetPasswordRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | | +| NewPassword | [NewPasswordRequest](#accounts-v1-NewPasswordRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | | +| IsEmailVerified | [IsEmailVerifiedRequest](#accounts-v1-IsEmailVerifiedRequest) | [IsEmailVerifiedResponse](#accounts-v1-IsEmailVerifiedResponse) | | diff --git a/buf.gen.yaml b/buf.gen.yaml index 49c570a..27aba36 100644 --- a/buf.gen.yaml +++ b/buf.gen.yaml @@ -20,3 +20,7 @@ plugins: out: . opt: - markdown,README.md + - remote: buf.build/protocolbuffers/dart:v25.0.0 + out: gen/dart/lib/src + opt: + - grpc