From f688d481bf89c4470aacfb189bf44908bbd3bf61 Mon Sep 17 00:00:00 2001 From: Nikolai Rodionov Date: Tue, 19 Mar 2024 22:17:54 +0100 Subject: [PATCH] first commit --- .gitignore | 49 +++ .gitmodules | 3 + .metadata | 10 + Containerfile | 9 + Makefile | 23 ++ README.md | 11 + analysis_options.yaml | 4 + lib/accounts/accounts_v1.pb.dart | 402 +++++++++++++++++++ lib/accounts/accounts_v1.pbenum.dart | 11 + lib/accounts/accounts_v1.pbgrpc.dart | 79 ++++ lib/accounts/accounts_v1.pbjson.dart | 98 +++++ lib/environments/environments_v1.pb.dart | 206 ++++++++++ lib/environments/environments_v1.pbenum.dart | 30 ++ lib/environments/environments_v1.pbgrpc.dart | 140 +++++++ lib/environments/environments_v1.pbjson.dart | 68 ++++ lib/main.dart | 8 + proto | 1 + pubspec.lock | 212 ++++++++++ pubspec.yaml | 87 ++++ softplayer_dart_proto.iml | 17 + softplayer_dart_proto_android.iml | 27 ++ 21 files changed, 1495 insertions(+) create mode 100644 .gitignore create mode 100644 .gitmodules create mode 100644 .metadata create mode 100644 Containerfile create mode 100644 Makefile create mode 100644 README.md create mode 100644 analysis_options.yaml create mode 100644 lib/accounts/accounts_v1.pb.dart create mode 100644 lib/accounts/accounts_v1.pbenum.dart create mode 100644 lib/accounts/accounts_v1.pbgrpc.dart create mode 100644 lib/accounts/accounts_v1.pbjson.dart create mode 100644 lib/environments/environments_v1.pb.dart create mode 100644 lib/environments/environments_v1.pbenum.dart create mode 100644 lib/environments/environments_v1.pbgrpc.dart create mode 100644 lib/environments/environments_v1.pbjson.dart create mode 100644 lib/main.dart create mode 160000 proto create mode 100644 pubspec.lock create mode 100644 pubspec.yaml create mode 100644 softplayer_dart_proto.iml create mode 100644 softplayer_dart_proto_android.iml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..525e05c --- /dev/null +++ b/.gitignore @@ -0,0 +1,49 @@ +.DS_Store +.dart_tool/ + +.pub/ + +.idea/ +.vagrant/ +.sconsign.dblite +.svn/ + +migrate_working_dir/ + +*.swp +profile + +DerivedData/ + +.generated/ + +*.pbxuser +*.mode1v3 +*.mode2v3 +*.perspectivev3 + +!default.pbxuser +!default.mode1v3 +!default.mode2v3 +!default.perspectivev3 + +xcuserdata + +*.moved-aside + +*.pyc +*sync/ +Icon? +.tags* + +build/ +.android/ +.ios/ +.flutter-plugins +.flutter-plugins-dependencies + +# Symbolication related +app.*.symbols + +# Obfuscation related +app.*.map.json diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..05cfe43 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "proto"] + path = proto + url = git@git.badhouseplants.net:softplayer/softplayer-proto.git diff --git a/.metadata b/.metadata new file mode 100644 index 0000000..ea7c095 --- /dev/null +++ b/.metadata @@ -0,0 +1,10 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: "bae5e49bc2a867403c43b2aae2de8f8c33b037e4" + channel: "stable" + +project_type: module diff --git a/Containerfile b/Containerfile new file mode 100644 index 0000000..4880501 --- /dev/null +++ b/Containerfile @@ -0,0 +1,9 @@ +FROM alpine:3.19.1 +RUN apk update +RUN apk add --no-cache git make musl-dev protobuf protobuf-dev +RUN apk add --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing/ dart dart-sdk +ENV PATH /root/.pub-cache/bin:$PATH +RUN dart pub global activate protoc_plugin + +CMD [ "protoc -v" ] + diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..7521c0d --- /dev/null +++ b/Makefile @@ -0,0 +1,23 @@ +# --------------------------------------------------------------------- +# -- Which container tool to use +# --------------------------------------------------------------------- +CONTAINER_TOOL ?= docker + +container-go-protobuf: + $(CONTAINER_TOOL) build -t gogen . && \ + $(CONTAINER_TOOL) run --rm \ + -v $$(pwd)/proto:/proto \ + -v $$(pwd)/lib:/out \ + gogen \ + protoc \ + --dart_out=grpc:/out/ \ + --proto_path=proto/proto \ + $$(find proto -type f -iname "*.proto") + +update-exports: + rm -f ./lib/main.dart && \ + cd lib && \ + for file in $$(find . -type f -iname "*.dart" ! -name "main.dart") ; do \ + echo "export '$${file}';" >> main.dart ; \ + done + diff --git a/README.md b/README.md new file mode 100644 index 0000000..a9b07de --- /dev/null +++ b/README.md @@ -0,0 +1,11 @@ +# softplayer_dart_proto + +A new Flutter module project. + +## Getting Started + +For help getting started with Flutter development, view the online +[documentation](https://flutter.dev/). + +For instructions integrating Flutter modules to your existing applications, +see the [add-to-app documentation](https://flutter.dev/docs/development/add-to-app). diff --git a/analysis_options.yaml b/analysis_options.yaml new file mode 100644 index 0000000..a5744c1 --- /dev/null +++ b/analysis_options.yaml @@ -0,0 +1,4 @@ +include: package:flutter_lints/flutter.yaml + +# Additional information about this file can be found at +# https://dart.dev/guides/language/analysis-options diff --git a/lib/accounts/accounts_v1.pb.dart b/lib/accounts/accounts_v1.pb.dart new file mode 100644 index 0000000..7835b2c --- /dev/null +++ b/lib/accounts/accounts_v1.pb.dart @@ -0,0 +1,402 @@ +// +// Generated code. Do not modify. +// source: accounts/accounts_v1.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:core' as $core; + +import 'package:protobuf/protobuf.dart' as $pb; + +/// * +/// Represents a environment UUID only +class AccountId extends $pb.GeneratedMessage { + factory AccountId({ + $core.String? id, + }) { + final $result = create(); + if (id != null) { + $result.id = id; + } + return $result; + } + AccountId._() : super(); + factory AccountId.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory AccountId.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'AccountId', package: const $pb.PackageName(_omitMessageNames ? '' : 'accounts'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'id') + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + AccountId clone() => AccountId()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + AccountId copyWith(void Function(AccountId) updates) => super.copyWith((message) => updates(message as AccountId)) as AccountId; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static AccountId create() => AccountId._(); + AccountId createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static AccountId getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static AccountId? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get id => $_getSZ(0); + @$pb.TagNumber(1) + set id($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasId() => $_has(0); + @$pb.TagNumber(1) + void clearId() => clearField(1); +} + +class AccountPassword extends $pb.GeneratedMessage { + factory AccountPassword({ + $core.String? password, + }) { + final $result = create(); + if (password != null) { + $result.password = password; + } + return $result; + } + AccountPassword._() : super(); + factory AccountPassword.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory AccountPassword.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'AccountPassword', package: const $pb.PackageName(_omitMessageNames ? '' : 'accounts'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'Password', protoName: 'Password') + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + AccountPassword clone() => AccountPassword()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + AccountPassword copyWith(void Function(AccountPassword) updates) => super.copyWith((message) => updates(message as AccountPassword)) as AccountPassword; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static AccountPassword create() => AccountPassword._(); + AccountPassword createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static AccountPassword getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static AccountPassword? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get password => $_getSZ(0); + @$pb.TagNumber(1) + set password($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasPassword() => $_has(0); + @$pb.TagNumber(1) + void clearPassword() => clearField(1); +} + +class AccountData extends $pb.GeneratedMessage { + factory AccountData({ + $core.String? name, + $core.String? email, + }) { + final $result = create(); + if (name != null) { + $result.name = name; + } + if (email != null) { + $result.email = email; + } + return $result; + } + AccountData._() : super(); + factory AccountData.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory AccountData.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'AccountData', package: const $pb.PackageName(_omitMessageNames ? '' : 'accounts'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'name') + ..aOS(2, _omitFieldNames ? '' : 'email') + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + AccountData clone() => AccountData()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + AccountData copyWith(void Function(AccountData) updates) => super.copyWith((message) => updates(message as AccountData)) as AccountData; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static AccountData create() => AccountData._(); + AccountData createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static AccountData getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static AccountData? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get name => $_getSZ(0); + @$pb.TagNumber(1) + set name($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasName() => $_has(0); + @$pb.TagNumber(1) + void clearName() => clearField(1); + + @$pb.TagNumber(2) + $core.String get email => $_getSZ(1); + @$pb.TagNumber(2) + set email($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasEmail() => $_has(1); + @$pb.TagNumber(2) + void clearEmail() => clearField(2); +} + +class AccountWithPassword extends $pb.GeneratedMessage { + factory AccountWithPassword({ + AccountData? data, + AccountPassword? accountPassword, + }) { + final $result = create(); + if (data != null) { + $result.data = data; + } + if (accountPassword != null) { + $result.accountPassword = accountPassword; + } + return $result; + } + AccountWithPassword._() : super(); + factory AccountWithPassword.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory AccountWithPassword.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'AccountWithPassword', package: const $pb.PackageName(_omitMessageNames ? '' : 'accounts'), createEmptyInstance: create) + ..aOM(1, _omitFieldNames ? '' : 'data', subBuilder: AccountData.create) + ..aOM(2, _omitFieldNames ? '' : 'AccountPassword', protoName: 'AccountPassword', subBuilder: AccountPassword.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + AccountWithPassword clone() => AccountWithPassword()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + AccountWithPassword copyWith(void Function(AccountWithPassword) updates) => super.copyWith((message) => updates(message as AccountWithPassword)) as AccountWithPassword; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static AccountWithPassword create() => AccountWithPassword._(); + AccountWithPassword createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static AccountWithPassword getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static AccountWithPassword? _defaultInstance; + + @$pb.TagNumber(1) + AccountData get data => $_getN(0); + @$pb.TagNumber(1) + set data(AccountData v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasData() => $_has(0); + @$pb.TagNumber(1) + void clearData() => clearField(1); + @$pb.TagNumber(1) + AccountData ensureData() => $_ensure(0); + + @$pb.TagNumber(2) + AccountPassword get accountPassword => $_getN(1); + @$pb.TagNumber(2) + set accountPassword(AccountPassword v) { setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasAccountPassword() => $_has(1); + @$pb.TagNumber(2) + void clearAccountPassword() => clearField(2); + @$pb.TagNumber(2) + AccountPassword ensureAccountPassword() => $_ensure(1); +} + +class AccountFull extends $pb.GeneratedMessage { + factory AccountFull({ + AccountId? id, + AccountData? data, + }) { + final $result = create(); + if (id != null) { + $result.id = id; + } + if (data != null) { + $result.data = data; + } + return $result; + } + AccountFull._() : super(); + factory AccountFull.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory AccountFull.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'AccountFull', package: const $pb.PackageName(_omitMessageNames ? '' : 'accounts'), createEmptyInstance: create) + ..aOM(1, _omitFieldNames ? '' : 'id', subBuilder: AccountId.create) + ..aOM(2, _omitFieldNames ? '' : 'data', subBuilder: AccountData.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + AccountFull clone() => AccountFull()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + AccountFull copyWith(void Function(AccountFull) updates) => super.copyWith((message) => updates(message as AccountFull)) as AccountFull; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static AccountFull create() => AccountFull._(); + AccountFull createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static AccountFull getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static AccountFull? _defaultInstance; + + @$pb.TagNumber(1) + AccountId get id => $_getN(0); + @$pb.TagNumber(1) + set id(AccountId v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasId() => $_has(0); + @$pb.TagNumber(1) + void clearId() => clearField(1); + @$pb.TagNumber(1) + AccountId ensureId() => $_ensure(0); + + @$pb.TagNumber(2) + AccountData get data => $_getN(1); + @$pb.TagNumber(2) + set data(AccountData v) { setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasData() => $_has(1); + @$pb.TagNumber(2) + void clearData() => clearField(2); + @$pb.TagNumber(2) + AccountData ensureData() => $_ensure(1); +} + +class AccountFullWithToken extends $pb.GeneratedMessage { + factory AccountFullWithToken({ + AccountId? id, + AccountData? data, + $core.String? token, + }) { + final $result = create(); + if (id != null) { + $result.id = id; + } + if (data != null) { + $result.data = data; + } + if (token != null) { + $result.token = token; + } + return $result; + } + AccountFullWithToken._() : super(); + factory AccountFullWithToken.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory AccountFullWithToken.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'AccountFullWithToken', package: const $pb.PackageName(_omitMessageNames ? '' : 'accounts'), createEmptyInstance: create) + ..aOM(1, _omitFieldNames ? '' : 'id', subBuilder: AccountId.create) + ..aOM(2, _omitFieldNames ? '' : 'data', subBuilder: AccountData.create) + ..aOS(3, _omitFieldNames ? '' : 'Token', protoName: 'Token') + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + AccountFullWithToken clone() => AccountFullWithToken()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + AccountFullWithToken copyWith(void Function(AccountFullWithToken) updates) => super.copyWith((message) => updates(message as AccountFullWithToken)) as AccountFullWithToken; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static AccountFullWithToken create() => AccountFullWithToken._(); + AccountFullWithToken createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static AccountFullWithToken getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static AccountFullWithToken? _defaultInstance; + + @$pb.TagNumber(1) + AccountId get id => $_getN(0); + @$pb.TagNumber(1) + set id(AccountId v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasId() => $_has(0); + @$pb.TagNumber(1) + void clearId() => clearField(1); + @$pb.TagNumber(1) + AccountId ensureId() => $_ensure(0); + + @$pb.TagNumber(2) + AccountData get data => $_getN(1); + @$pb.TagNumber(2) + set data(AccountData v) { setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasData() => $_has(1); + @$pb.TagNumber(2) + void clearData() => clearField(2); + @$pb.TagNumber(2) + AccountData ensureData() => $_ensure(1); + + @$pb.TagNumber(3) + $core.String get token => $_getSZ(2); + @$pb.TagNumber(3) + set token($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasToken() => $_has(2); + @$pb.TagNumber(3) + void clearToken() => clearField(3); +} + + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/lib/accounts/accounts_v1.pbenum.dart b/lib/accounts/accounts_v1.pbenum.dart new file mode 100644 index 0000000..9388679 --- /dev/null +++ b/lib/accounts/accounts_v1.pbenum.dart @@ -0,0 +1,11 @@ +// +// Generated code. Do not modify. +// source: accounts/accounts_v1.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + diff --git a/lib/accounts/accounts_v1.pbgrpc.dart b/lib/accounts/accounts_v1.pbgrpc.dart new file mode 100644 index 0000000..70b7882 --- /dev/null +++ b/lib/accounts/accounts_v1.pbgrpc.dart @@ -0,0 +1,79 @@ +// +// Generated code. Do not modify. +// source: accounts/accounts_v1.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:async' as $async; +import 'dart:core' as $core; + +import 'package:grpc/service_api.dart' as $grpc; +import 'package:protobuf/protobuf.dart' as $pb; + +import 'accounts_v1.pb.dart' as $2; + +export 'accounts_v1.pb.dart'; + +@$pb.GrpcServiceName('accounts.Accounts') +class AccountsClient extends $grpc.Client { + static final _$signUp = $grpc.ClientMethod<$2.AccountWithPassword, $2.AccountFullWithToken>( + '/accounts.Accounts/SignUp', + ($2.AccountWithPassword value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $2.AccountFullWithToken.fromBuffer(value)); + static final _$signIn = $grpc.ClientMethod<$2.AccountWithPassword, $2.AccountFullWithToken>( + '/accounts.Accounts/SignIn', + ($2.AccountWithPassword value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $2.AccountFullWithToken.fromBuffer(value)); + + AccountsClient($grpc.ClientChannel channel, + {$grpc.CallOptions? options, + $core.Iterable<$grpc.ClientInterceptor>? interceptors}) + : super(channel, options: options, + interceptors: interceptors); + + $grpc.ResponseFuture<$2.AccountFullWithToken> signUp($2.AccountWithPassword request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$signUp, request, options: options); + } + + $grpc.ResponseFuture<$2.AccountFullWithToken> signIn($2.AccountWithPassword request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$signIn, request, options: options); + } +} + +@$pb.GrpcServiceName('accounts.Accounts') +abstract class AccountsServiceBase extends $grpc.Service { + $core.String get $name => 'accounts.Accounts'; + + AccountsServiceBase() { + $addMethod($grpc.ServiceMethod<$2.AccountWithPassword, $2.AccountFullWithToken>( + 'SignUp', + signUp_Pre, + false, + false, + ($core.List<$core.int> value) => $2.AccountWithPassword.fromBuffer(value), + ($2.AccountFullWithToken value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$2.AccountWithPassword, $2.AccountFullWithToken>( + 'SignIn', + signIn_Pre, + false, + false, + ($core.List<$core.int> value) => $2.AccountWithPassword.fromBuffer(value), + ($2.AccountFullWithToken value) => value.writeToBuffer())); + } + + $async.Future<$2.AccountFullWithToken> signUp_Pre($grpc.ServiceCall call, $async.Future<$2.AccountWithPassword> request) async { + return signUp(call, await request); + } + + $async.Future<$2.AccountFullWithToken> signIn_Pre($grpc.ServiceCall call, $async.Future<$2.AccountWithPassword> request) async { + return signIn(call, await request); + } + + $async.Future<$2.AccountFullWithToken> signUp($grpc.ServiceCall call, $2.AccountWithPassword request); + $async.Future<$2.AccountFullWithToken> signIn($grpc.ServiceCall call, $2.AccountWithPassword request); +} diff --git a/lib/accounts/accounts_v1.pbjson.dart b/lib/accounts/accounts_v1.pbjson.dart new file mode 100644 index 0000000..6a7ce03 --- /dev/null +++ b/lib/accounts/accounts_v1.pbjson.dart @@ -0,0 +1,98 @@ +// +// Generated code. Do not modify. +// source: accounts/accounts_v1.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:convert' as $convert; +import 'dart:core' as $core; +import 'dart:typed_data' as $typed_data; + +@$core.Deprecated('Use accountIdDescriptor instead') +const AccountId$json = { + '1': 'AccountId', + '2': [ + {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'}, + ], +}; + +/// Descriptor for `AccountId`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List accountIdDescriptor = $convert.base64Decode( + 'CglBY2NvdW50SWQSDgoCaWQYASABKAlSAmlk'); + +@$core.Deprecated('Use accountPasswordDescriptor instead') +const AccountPassword$json = { + '1': 'AccountPassword', + '2': [ + {'1': 'Password', '3': 1, '4': 1, '5': 9, '10': 'Password'}, + ], +}; + +/// Descriptor for `AccountPassword`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List accountPasswordDescriptor = $convert.base64Decode( + 'Cg9BY2NvdW50UGFzc3dvcmQSGgoIUGFzc3dvcmQYASABKAlSCFBhc3N3b3Jk'); + +@$core.Deprecated('Use accountDataDescriptor instead') +const AccountData$json = { + '1': 'AccountData', + '2': [ + {'1': 'name', '3': 1, '4': 1, '5': 9, '10': 'name'}, + {'1': 'email', '3': 2, '4': 1, '5': 9, '10': 'email'}, + ], +}; + +/// Descriptor for `AccountData`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List accountDataDescriptor = $convert.base64Decode( + 'CgtBY2NvdW50RGF0YRISCgRuYW1lGAEgASgJUgRuYW1lEhQKBWVtYWlsGAIgASgJUgVlbWFpbA' + '=='); + +@$core.Deprecated('Use accountWithPasswordDescriptor instead') +const AccountWithPassword$json = { + '1': 'AccountWithPassword', + '2': [ + {'1': 'data', '3': 1, '4': 1, '5': 11, '6': '.accounts.AccountData', '10': 'data'}, + {'1': 'AccountPassword', '3': 2, '4': 1, '5': 11, '6': '.accounts.AccountPassword', '10': 'AccountPassword'}, + ], +}; + +/// Descriptor for `AccountWithPassword`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List accountWithPasswordDescriptor = $convert.base64Decode( + 'ChNBY2NvdW50V2l0aFBhc3N3b3JkEikKBGRhdGEYASABKAsyFS5hY2NvdW50cy5BY2NvdW50RG' + 'F0YVIEZGF0YRJDCg9BY2NvdW50UGFzc3dvcmQYAiABKAsyGS5hY2NvdW50cy5BY2NvdW50UGFz' + 'c3dvcmRSD0FjY291bnRQYXNzd29yZA=='); + +@$core.Deprecated('Use accountFullDescriptor instead') +const AccountFull$json = { + '1': 'AccountFull', + '2': [ + {'1': 'id', '3': 1, '4': 1, '5': 11, '6': '.accounts.AccountId', '10': 'id'}, + {'1': 'data', '3': 2, '4': 1, '5': 11, '6': '.accounts.AccountData', '10': 'data'}, + ], +}; + +/// Descriptor for `AccountFull`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List accountFullDescriptor = $convert.base64Decode( + 'CgtBY2NvdW50RnVsbBIjCgJpZBgBIAEoCzITLmFjY291bnRzLkFjY291bnRJZFICaWQSKQoEZG' + 'F0YRgCIAEoCzIVLmFjY291bnRzLkFjY291bnREYXRhUgRkYXRh'); + +@$core.Deprecated('Use accountFullWithTokenDescriptor instead') +const AccountFullWithToken$json = { + '1': 'AccountFullWithToken', + '2': [ + {'1': 'id', '3': 1, '4': 1, '5': 11, '6': '.accounts.AccountId', '10': 'id'}, + {'1': 'data', '3': 2, '4': 1, '5': 11, '6': '.accounts.AccountData', '10': 'data'}, + {'1': 'Token', '3': 3, '4': 1, '5': 9, '10': 'Token'}, + ], +}; + +/// Descriptor for `AccountFullWithToken`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List accountFullWithTokenDescriptor = $convert.base64Decode( + 'ChRBY2NvdW50RnVsbFdpdGhUb2tlbhIjCgJpZBgBIAEoCzITLmFjY291bnRzLkFjY291bnRJZF' + 'ICaWQSKQoEZGF0YRgCIAEoCzIVLmFjY291bnRzLkFjY291bnREYXRhUgRkYXRhEhQKBVRva2Vu' + 'GAMgASgJUgVUb2tlbg=='); + diff --git a/lib/environments/environments_v1.pb.dart b/lib/environments/environments_v1.pb.dart new file mode 100644 index 0000000..ccd9c22 --- /dev/null +++ b/lib/environments/environments_v1.pb.dart @@ -0,0 +1,206 @@ +// +// Generated code. Do not modify. +// source: environments/environments_v1.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:core' as $core; + +import 'package:protobuf/protobuf.dart' as $pb; + +import 'environments_v1.pbenum.dart'; + +export 'environments_v1.pbenum.dart'; + +/// * +/// Represents a environment UUID only +class EnvironmentId extends $pb.GeneratedMessage { + factory EnvironmentId({ + $core.String? id, + }) { + final $result = create(); + if (id != null) { + $result.id = id; + } + return $result; + } + EnvironmentId._() : super(); + factory EnvironmentId.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory EnvironmentId.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'EnvironmentId', package: const $pb.PackageName(_omitMessageNames ? '' : 'environments'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'id') + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + EnvironmentId clone() => EnvironmentId()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + EnvironmentId copyWith(void Function(EnvironmentId) updates) => super.copyWith((message) => updates(message as EnvironmentId)) as EnvironmentId; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static EnvironmentId create() => EnvironmentId._(); + EnvironmentId createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static EnvironmentId getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static EnvironmentId? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get id => $_getSZ(0); + @$pb.TagNumber(1) + set id($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasId() => $_has(0); + @$pb.TagNumber(1) + void clearId() => clearField(1); +} + +class EnvironmentData extends $pb.GeneratedMessage { + factory EnvironmentData({ + $core.String? name, + Provider? provider, + }) { + final $result = create(); + if (name != null) { + $result.name = name; + } + if (provider != null) { + $result.provider = provider; + } + return $result; + } + EnvironmentData._() : super(); + factory EnvironmentData.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory EnvironmentData.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'EnvironmentData', package: const $pb.PackageName(_omitMessageNames ? '' : 'environments'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'name') + ..e(2, _omitFieldNames ? '' : 'provider', $pb.PbFieldType.OE, defaultOrMaker: Provider.Hetzner, valueOf: Provider.valueOf, enumValues: Provider.values) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + EnvironmentData clone() => EnvironmentData()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + EnvironmentData copyWith(void Function(EnvironmentData) updates) => super.copyWith((message) => updates(message as EnvironmentData)) as EnvironmentData; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static EnvironmentData create() => EnvironmentData._(); + EnvironmentData createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static EnvironmentData getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static EnvironmentData? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get name => $_getSZ(0); + @$pb.TagNumber(1) + set name($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasName() => $_has(0); + @$pb.TagNumber(1) + void clearName() => clearField(1); + + @$pb.TagNumber(2) + Provider get provider => $_getN(1); + @$pb.TagNumber(2) + set provider(Provider v) { setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasProvider() => $_has(1); + @$pb.TagNumber(2) + void clearProvider() => clearField(2); +} + +class EnvironmentFull extends $pb.GeneratedMessage { + factory EnvironmentFull({ + EnvironmentId? id, + EnvironmentData? data, + }) { + final $result = create(); + if (id != null) { + $result.id = id; + } + if (data != null) { + $result.data = data; + } + return $result; + } + EnvironmentFull._() : super(); + factory EnvironmentFull.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory EnvironmentFull.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'EnvironmentFull', package: const $pb.PackageName(_omitMessageNames ? '' : 'environments'), createEmptyInstance: create) + ..aOM(1, _omitFieldNames ? '' : 'id', subBuilder: EnvironmentId.create) + ..aOM(2, _omitFieldNames ? '' : 'data', subBuilder: EnvironmentData.create) + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + EnvironmentFull clone() => EnvironmentFull()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + EnvironmentFull copyWith(void Function(EnvironmentFull) updates) => super.copyWith((message) => updates(message as EnvironmentFull)) as EnvironmentFull; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static EnvironmentFull create() => EnvironmentFull._(); + EnvironmentFull createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static EnvironmentFull getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static EnvironmentFull? _defaultInstance; + + @$pb.TagNumber(1) + EnvironmentId get id => $_getN(0); + @$pb.TagNumber(1) + set id(EnvironmentId v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasId() => $_has(0); + @$pb.TagNumber(1) + void clearId() => clearField(1); + @$pb.TagNumber(1) + EnvironmentId ensureId() => $_ensure(0); + + @$pb.TagNumber(2) + EnvironmentData get data => $_getN(1); + @$pb.TagNumber(2) + set data(EnvironmentData v) { setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasData() => $_has(1); + @$pb.TagNumber(2) + void clearData() => clearField(2); + @$pb.TagNumber(2) + EnvironmentData ensureData() => $_ensure(1); +} + + +const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); +const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/lib/environments/environments_v1.pbenum.dart b/lib/environments/environments_v1.pbenum.dart new file mode 100644 index 0000000..2c58f72 --- /dev/null +++ b/lib/environments/environments_v1.pbenum.dart @@ -0,0 +1,30 @@ +// +// Generated code. Do not modify. +// source: environments/environments_v1.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:core' as $core; + +import 'package:protobuf/protobuf.dart' as $pb; + +class Provider extends $pb.ProtobufEnum { + static const Provider Hetzner = Provider._(0, _omitEnumNames ? '' : 'Hetzner'); + + static const $core.List values = [ + Hetzner, + ]; + + static final $core.Map<$core.int, Provider> _byValue = $pb.ProtobufEnum.initByValue(values); + static Provider? valueOf($core.int value) => _byValue[value]; + + const Provider._($core.int v, $core.String n) : super(v, n); +} + + +const _omitEnumNames = $core.bool.fromEnvironment('protobuf.omit_enum_names'); diff --git a/lib/environments/environments_v1.pbgrpc.dart b/lib/environments/environments_v1.pbgrpc.dart new file mode 100644 index 0000000..fb4cb77 --- /dev/null +++ b/lib/environments/environments_v1.pbgrpc.dart @@ -0,0 +1,140 @@ +// +// Generated code. Do not modify. +// source: environments/environments_v1.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:async' as $async; +import 'dart:core' as $core; + +import 'package:grpc/service_api.dart' as $grpc; +import 'package:protobuf/protobuf.dart' as $pb; + +import '../google/protobuf/empty.pb.dart' as $1; +import 'environments_v1.pb.dart' as $0; + +export 'environments_v1.pb.dart'; + +@$pb.GrpcServiceName('environments.Environments') +class EnvironmentsClient extends $grpc.Client { + static final _$create = $grpc.ClientMethod<$0.EnvironmentData, $0.EnvironmentFull>( + '/environments.Environments/Create', + ($0.EnvironmentData value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $0.EnvironmentFull.fromBuffer(value)); + static final _$update = $grpc.ClientMethod<$0.EnvironmentFull, $0.EnvironmentFull>( + '/environments.Environments/Update', + ($0.EnvironmentFull value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $0.EnvironmentFull.fromBuffer(value)); + static final _$delete = $grpc.ClientMethod<$0.EnvironmentFull, $1.Empty>( + '/environments.Environments/Delete', + ($0.EnvironmentFull value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $1.Empty.fromBuffer(value)); + static final _$get = $grpc.ClientMethod<$0.EnvironmentId, $0.EnvironmentFull>( + '/environments.Environments/Get', + ($0.EnvironmentId value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $0.EnvironmentFull.fromBuffer(value)); + static final _$list = $grpc.ClientMethod<$1.Empty, $0.EnvironmentFull>( + '/environments.Environments/List', + ($1.Empty value) => value.writeToBuffer(), + ($core.List<$core.int> value) => $0.EnvironmentFull.fromBuffer(value)); + + EnvironmentsClient($grpc.ClientChannel channel, + {$grpc.CallOptions? options, + $core.Iterable<$grpc.ClientInterceptor>? interceptors}) + : super(channel, options: options, + interceptors: interceptors); + + $grpc.ResponseFuture<$0.EnvironmentFull> create($0.EnvironmentData request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$create, request, options: options); + } + + $grpc.ResponseFuture<$0.EnvironmentFull> update($0.EnvironmentFull request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$update, request, options: options); + } + + $grpc.ResponseFuture<$1.Empty> delete($0.EnvironmentFull request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$delete, request, options: options); + } + + $grpc.ResponseFuture<$0.EnvironmentFull> get($0.EnvironmentId request, {$grpc.CallOptions? options}) { + return $createUnaryCall(_$get, request, options: options); + } + + $grpc.ResponseStream<$0.EnvironmentFull> list($1.Empty request, {$grpc.CallOptions? options}) { + return $createStreamingCall(_$list, $async.Stream.fromIterable([request]), options: options); + } +} + +@$pb.GrpcServiceName('environments.Environments') +abstract class EnvironmentsServiceBase extends $grpc.Service { + $core.String get $name => 'environments.Environments'; + + EnvironmentsServiceBase() { + $addMethod($grpc.ServiceMethod<$0.EnvironmentData, $0.EnvironmentFull>( + 'Create', + create_Pre, + false, + false, + ($core.List<$core.int> value) => $0.EnvironmentData.fromBuffer(value), + ($0.EnvironmentFull value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$0.EnvironmentFull, $0.EnvironmentFull>( + 'Update', + update_Pre, + false, + false, + ($core.List<$core.int> value) => $0.EnvironmentFull.fromBuffer(value), + ($0.EnvironmentFull value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$0.EnvironmentFull, $1.Empty>( + 'Delete', + delete_Pre, + false, + false, + ($core.List<$core.int> value) => $0.EnvironmentFull.fromBuffer(value), + ($1.Empty value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$0.EnvironmentId, $0.EnvironmentFull>( + 'Get', + get_Pre, + false, + false, + ($core.List<$core.int> value) => $0.EnvironmentId.fromBuffer(value), + ($0.EnvironmentFull value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$1.Empty, $0.EnvironmentFull>( + 'List', + list_Pre, + false, + true, + ($core.List<$core.int> value) => $1.Empty.fromBuffer(value), + ($0.EnvironmentFull value) => value.writeToBuffer())); + } + + $async.Future<$0.EnvironmentFull> create_Pre($grpc.ServiceCall call, $async.Future<$0.EnvironmentData> request) async { + return create(call, await request); + } + + $async.Future<$0.EnvironmentFull> update_Pre($grpc.ServiceCall call, $async.Future<$0.EnvironmentFull> request) async { + return update(call, await request); + } + + $async.Future<$1.Empty> delete_Pre($grpc.ServiceCall call, $async.Future<$0.EnvironmentFull> request) async { + return delete(call, await request); + } + + $async.Future<$0.EnvironmentFull> get_Pre($grpc.ServiceCall call, $async.Future<$0.EnvironmentId> request) async { + return get(call, await request); + } + + $async.Stream<$0.EnvironmentFull> list_Pre($grpc.ServiceCall call, $async.Future<$1.Empty> request) async* { + yield* list(call, await request); + } + + $async.Future<$0.EnvironmentFull> create($grpc.ServiceCall call, $0.EnvironmentData request); + $async.Future<$0.EnvironmentFull> update($grpc.ServiceCall call, $0.EnvironmentFull request); + $async.Future<$1.Empty> delete($grpc.ServiceCall call, $0.EnvironmentFull request); + $async.Future<$0.EnvironmentFull> get($grpc.ServiceCall call, $0.EnvironmentId request); + $async.Stream<$0.EnvironmentFull> list($grpc.ServiceCall call, $1.Empty request); +} diff --git a/lib/environments/environments_v1.pbjson.dart b/lib/environments/environments_v1.pbjson.dart new file mode 100644 index 0000000..a7bdec9 --- /dev/null +++ b/lib/environments/environments_v1.pbjson.dart @@ -0,0 +1,68 @@ +// +// Generated code. Do not modify. +// source: environments/environments_v1.proto +// +// @dart = 2.12 + +// ignore_for_file: annotate_overrides, camel_case_types, comment_references +// ignore_for_file: constant_identifier_names, library_prefixes +// ignore_for_file: non_constant_identifier_names, prefer_final_fields +// ignore_for_file: unnecessary_import, unnecessary_this, unused_import + +import 'dart:convert' as $convert; +import 'dart:core' as $core; +import 'dart:typed_data' as $typed_data; + +@$core.Deprecated('Use providerDescriptor instead') +const Provider$json = { + '1': 'Provider', + '2': [ + {'1': 'Hetzner', '2': 0}, + ], +}; + +/// Descriptor for `Provider`. Decode as a `google.protobuf.EnumDescriptorProto`. +final $typed_data.Uint8List providerDescriptor = $convert.base64Decode( + 'CghQcm92aWRlchILCgdIZXR6bmVyEAA='); + +@$core.Deprecated('Use environmentIdDescriptor instead') +const EnvironmentId$json = { + '1': 'EnvironmentId', + '2': [ + {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'}, + ], +}; + +/// Descriptor for `EnvironmentId`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List environmentIdDescriptor = $convert.base64Decode( + 'Cg1FbnZpcm9ubWVudElkEg4KAmlkGAEgASgJUgJpZA=='); + +@$core.Deprecated('Use environmentDataDescriptor instead') +const EnvironmentData$json = { + '1': 'EnvironmentData', + '2': [ + {'1': 'name', '3': 1, '4': 1, '5': 9, '10': 'name'}, + {'1': 'provider', '3': 2, '4': 1, '5': 14, '6': '.environments.Provider', '10': 'provider'}, + ], +}; + +/// Descriptor for `EnvironmentData`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List environmentDataDescriptor = $convert.base64Decode( + 'Cg9FbnZpcm9ubWVudERhdGESEgoEbmFtZRgBIAEoCVIEbmFtZRIyCghwcm92aWRlchgCIAEoDj' + 'IWLmVudmlyb25tZW50cy5Qcm92aWRlclIIcHJvdmlkZXI='); + +@$core.Deprecated('Use environmentFullDescriptor instead') +const EnvironmentFull$json = { + '1': 'EnvironmentFull', + '2': [ + {'1': 'id', '3': 1, '4': 1, '5': 11, '6': '.environments.EnvironmentId', '10': 'id'}, + {'1': 'data', '3': 2, '4': 1, '5': 11, '6': '.environments.EnvironmentData', '10': 'data'}, + ], +}; + +/// Descriptor for `EnvironmentFull`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List environmentFullDescriptor = $convert.base64Decode( + 'Cg9FbnZpcm9ubWVudEZ1bGwSKwoCaWQYASABKAsyGy5lbnZpcm9ubWVudHMuRW52aXJvbm1lbn' + 'RJZFICaWQSMQoEZGF0YRgCIAEoCzIdLmVudmlyb25tZW50cy5FbnZpcm9ubWVudERhdGFSBGRh' + 'dGE='); + diff --git a/lib/main.dart b/lib/main.dart new file mode 100644 index 0000000..a31b9c5 --- /dev/null +++ b/lib/main.dart @@ -0,0 +1,8 @@ +export './environments/environments_v1.pbgrpc.dart'; +export './environments/environments_v1.pbjson.dart'; +export './environments/environments_v1.pbenum.dart'; +export './environments/environments_v1.pb.dart'; +export './accounts/accounts_v1.pbjson.dart'; +export './accounts/accounts_v1.pbgrpc.dart'; +export './accounts/accounts_v1.pb.dart'; +export './accounts/accounts_v1.pbenum.dart'; diff --git a/proto b/proto new file mode 160000 index 0000000..2bd6034 --- /dev/null +++ b/proto @@ -0,0 +1 @@ +Subproject commit 2bd603442ae86210a54c8edd14fe66dc111cb839 diff --git a/pubspec.lock b/pubspec.lock new file mode 100644 index 0000000..f5b0af9 --- /dev/null +++ b/pubspec.lock @@ -0,0 +1,212 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + async: + dependency: transitive + description: + name: async + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + url: "https://pub.dev" + source: hosted + version: "2.11.0" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + characters: + dependency: transitive + description: + name: characters + sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" + url: "https://pub.dev" + source: hosted + version: "1.3.0" + clock: + dependency: transitive + description: + name: clock + sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + url: "https://pub.dev" + source: hosted + version: "1.1.1" + collection: + dependency: transitive + description: + name: collection + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a + url: "https://pub.dev" + source: hosted + version: "1.18.0" + cupertino_icons: + dependency: "direct main" + description: + name: cupertino_icons + sha256: d57953e10f9f8327ce64a508a355f0b1ec902193f66288e8cb5070e7c47eeb2d + url: "https://pub.dev" + source: hosted + version: "1.0.6" + fake_async: + dependency: transitive + description: + name: fake_async + sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + url: "https://pub.dev" + source: hosted + version: "1.3.1" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_lints: + dependency: "direct dev" + description: + name: flutter_lints + sha256: e2a421b7e59244faef694ba7b30562e489c2b489866e505074eb005cd7060db7 + url: "https://pub.dev" + source: hosted + version: "3.0.1" + flutter_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa" + url: "https://pub.dev" + source: hosted + version: "10.0.0" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0 + url: "https://pub.dev" + source: hosted + version: "2.0.1" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47 + url: "https://pub.dev" + source: hosted + version: "2.0.1" + lints: + dependency: transitive + description: + name: lints + sha256: cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290 + url: "https://pub.dev" + source: hosted + version: "3.0.0" + matcher: + dependency: transitive + description: + name: matcher + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb + url: "https://pub.dev" + source: hosted + version: "0.12.16+1" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" + url: "https://pub.dev" + source: hosted + version: "0.8.0" + meta: + dependency: transitive + description: + name: meta + sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 + url: "https://pub.dev" + source: hosted + version: "1.11.0" + path: + dependency: transitive + description: + name: path + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" + url: "https://pub.dev" + source: hosted + version: "1.9.0" + sky_engine: + dependency: transitive + description: flutter + source: sdk + version: "0.0.99" + source_span: + dependency: transitive + description: + name: source_span + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" + url: "https://pub.dev" + source: hosted + version: "1.10.0" + stack_trace: + dependency: transitive + description: + name: stack_trace + sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" + url: "https://pub.dev" + source: hosted + version: "1.11.1" + stream_channel: + dependency: transitive + description: + name: stream_channel + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 + url: "https://pub.dev" + source: hosted + version: "2.1.2" + string_scanner: + dependency: transitive + description: + name: string_scanner + sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + url: "https://pub.dev" + source: hosted + version: "1.2.0" + term_glyph: + dependency: transitive + description: + name: term_glyph + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + url: "https://pub.dev" + source: hosted + version: "1.2.1" + test_api: + dependency: transitive + description: + name: test_api + sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + url: "https://pub.dev" + source: hosted + version: "0.6.1" + vector_math: + dependency: transitive + description: + name: vector_math + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 + url: "https://pub.dev" + source: hosted + version: "13.0.0" +sdks: + dart: ">=3.3.0 <4.0.0" diff --git a/pubspec.yaml b/pubspec.yaml new file mode 100644 index 0000000..6e3becf --- /dev/null +++ b/pubspec.yaml @@ -0,0 +1,87 @@ +name: softplayer_dart_proto +description: "A new Flutter module project." + +# The following defines the version and build number for your application. +# A version number is three numbers separated by dots, like 1.2.43 +# followed by an optional build number separated by a +. +# Both the version and the builder number may be overridden in flutter +# build by specifying --build-name and --build-number, respectively. +# In Android, build-name is used as versionName while build-number used as versionCode. +# Read more about Android versioning at https://developer.android.com/studio/publish/versioning +# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. +# Read more about iOS versioning at +# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html +# +# This version is used _only_ for the Runner app, which is used if you just do +# a `flutter run` or a `flutter make-host-app-editable`. It has no impact +# on any other native host app that you embed your Flutter project into. +version: 1.0.0+1 + +environment: + sdk: '>=3.3.0 <4.0.0' + +dependencies: + flutter: + sdk: flutter + + # The following adds the Cupertino Icons font to your application. + # Use with the CupertinoIcons class for iOS style icons. + cupertino_icons: ^1.0.6 + +dev_dependencies: + flutter_test: + sdk: flutter + flutter_lints: ^3.0.0 + +# For information on the generic Dart part of this file, see the +# following page: https://dart.dev/tools/pub/pubspec + +flutter: + # The following line ensures that the Material Icons font is + # included with your application, so that you can use the icons in + # the material Icons class. + uses-material-design: true + + # To add Flutter specific assets to your application, add an assets section, + # like this: + # assets: + # - images/a_dot_burr.jpeg + # - images/a_dot_ham.jpeg + + # An image asset can refer to one or more resolution-specific "variants", see + # https://flutter.dev/assets-and-images/#resolution-aware + + # For details regarding adding assets from package dependencies, see + # https://flutter.dev/assets-and-images/#from-packages + + # To add Flutter specific custom fonts to your application, add a fonts + # section here, in this "flutter" section. Each entry in this list should + # have a "family" key with the font family name, and a "fonts" key with a + # list giving the asset and other descriptors for the font. For + # example: + # fonts: + # - family: Schyler + # fonts: + # - asset: fonts/Schyler-Regular.ttf + # - asset: fonts/Schyler-Italic.ttf + # style: italic + # - family: Trajan Pro + # fonts: + # - asset: fonts/TrajanPro.ttf + # - asset: fonts/TrajanPro_Bold.ttf + # weight: 700 + # + # For details regarding fonts from package dependencies, + # see https://flutter.dev/custom-fonts/#from-packages + + + # This section identifies your Flutter project as a module meant for + # embedding in a native host app. These identifiers should _not_ ordinarily + # be changed after generation - they are used to ensure that the tooling can + # maintain consistency when adding or modifying assets and plugins. + # They also do not have any bearing on your native host application's + # identifiers, which may be completely independent or the same as these. + module: + androidX: true + androidPackage: com.example.softplayer_dart_proto + iosBundleIdentifier: com.example.softplayerDartProto diff --git a/softplayer_dart_proto.iml b/softplayer_dart_proto.iml new file mode 100644 index 0000000..f66303d --- /dev/null +++ b/softplayer_dart_proto.iml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/softplayer_dart_proto_android.iml b/softplayer_dart_proto_android.iml new file mode 100644 index 0000000..6fa7b63 --- /dev/null +++ b/softplayer_dart_proto_android.iml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + +