Skip to content

Commit 940fb07

Browse files
Gilzxu123
Gil
authored andcommitted
Firestore project: Import of API interfaces.
Import of firebase-ios-sdk from Github. - 07f4695 Updates Changelog for 4.5.0 release (firebase#908) by Zsika Phillip <protocol86@users.noreply.github.com> - 2b82a2e Allow serializing arbitrary length FieldValues (firebase#889) by rsgowman <rgowman@google.com> - 3e41f25 Fix test failures that occur during prod build (firebase#910) by rsgowman <rgowman@google.com> - f122cf7 Fix MutationQueue issue resulting in re-sending acknowled... by Michael Lehenbauer <mikelehen@gmail.com> - 7522314 Partial wrapping of pb_ostream_t (pt2) (firebase#903) by rsgowman <rgowman@google.com> - 0d3adb1 Partial wrapping of pb_ostream_t (pt1) (firebase#899) by rsgowman <rgowman@google.com> - e41f4b1 Merge Release 4.10.1 into Master (firebase#896) by zxu <zxu@google.com> - 2ae36f1 [De]Serialize FieldValue map_values ("Objects") (firebase#878) by rsgowman <rgowman@google.com> - 5930ad2 Factor out a universal build script (firebase#884) by Gil <mcg@google.com> - 8ef0f14 Adds Email link sign-in (firebase#882) by Paul Beusterien <paulbeusterien@google.com> - 0b8f216 Merge pull request firebase#880 from firebase/release-4.10.0 by Paul Beusterien <paulbeusterien@google.com> - 8311c64 port paths to FSTDocumentKey (firebase#877) by zxu <zxu@google.com> - 34ebf10 Add 10 second timeout waiting for connection before clien... by Michael Lehenbauer <mikelehen@gmail.com> - 1c40e7a add converters and port paths to FSTQuery (firebase#869) by zxu <zxu@google.com> - 9b5b4d8 Serialize (and deserialize) string values (firebase#864) by rsgowman <rgowman@google.com> - c6f73f7 Fix the issue completion handler is not triggered in subs... by Chen Liang <chliang@google.com> - 1ecf690 Add FieldValue.boolean_value() (firebase#862) by rsgowman <rgowman@google.com> - 3e7c062 replacing Auth by C++ auth implementation (firebase#802) by zxu <zxu@google.com> - 13aeb61 Eliminate TypedValue and serialize direct from FieldValue... by rsgowman <rgowman@google.com> PiperOrigin-RevId: 188809445
1 parent 17c85c2 commit 940fb07

File tree

1 file changed

+115
-0
lines changed

1 file changed

+115
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
/*
2+
* Copyright 2018 Google
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
#ifndef FIRESTORE_CORE_INCLUDE_FIREBASE_FIRESTORE_FIRESTORE_ERRORS_H_
18+
#define FIRESTORE_CORE_INCLUDE_FIREBASE_FIRESTORE_FIRESTORE_ERRORS_H_
19+
20+
namespace firebase {
21+
namespace firestore {
22+
23+
/**
24+
* Error codes used by Cloud Firestore.
25+
*
26+
* The codes are in sync with the Firestore iOS client SDK header file
27+
* FIRFirestoreErrors.h.
28+
*/
29+
enum FirestoreErrorCode {
30+
/**
31+
* The operation completed successfully. NSError objects will never have a
32+
* code with this value.
33+
*/
34+
Ok = 0,
35+
36+
/** The operation was cancelled (typically by the caller). */
37+
Cancelled = 1,
38+
39+
/** Unknown error or an error from a different error domain. */
40+
Unknown = 2,
41+
42+
/**
43+
* Client specified an invalid argument. Note that this differs from
44+
* FailedPrecondition. InvalidArgument indicates arguments that are
45+
* problematic regardless of the state of the system (e.g., an invalid field
46+
* name).
47+
*/
48+
InvalidArgument = 3,
49+
50+
/**
51+
* Deadline expired before operation could complete. For operations that
52+
* change the state of the system, this error may be returned even if the
53+
* operation has completed successfully. For example, a successful response
54+
* from a server could have been delayed long enough for the deadline to
55+
* expire.
56+
*/
57+
DeadlineExceeded = 4,
58+
59+
/** Some requested document was not found. */
60+
NotFound = 5,
61+
62+
/** Some document that we attempted to create already exists. */
63+
AlreadyExists = 6,
64+
65+
/** The caller does not have permission to execute the specified operation. */
66+
PermissionDenied = 7,
67+
68+
/**
69+
* Some resource has been exhausted, perhaps a per-user quota, or perhaps the
70+
* entire file system is out of space.
71+
*/
72+
ResourceExhausted = 8,
73+
74+
/**
75+
* Operation was rejected because the system is not in a state required for
76+
* the operation's execution.
77+
*/
78+
FailedPrecondition = 9,
79+
80+
/**
81+
* The operation was aborted, typically due to a concurrency issue like
82+
* transaction aborts, etc.
83+
*/
84+
Aborted = 10,
85+
86+
/** Operation was attempted past the valid range. */
87+
OutOfRange = 11,
88+
89+
/** Operation is not implemented or not supported/enabled. */
90+
Unimplemented = 12,
91+
92+
/**
93+
* Internal errors. Means some invariants expected by underlying system has
94+
* been broken. If you see one of these errors, something is very broken.
95+
*/
96+
Internal = 13,
97+
98+
/**
99+
* The service is currently unavailable. This is a most likely a transient
100+
* condition and may be corrected by retrying with a backoff.
101+
*/
102+
Unavailable = 14,
103+
104+
/** Unrecoverable data loss or corruption. */
105+
DataLoss = 15,
106+
107+
/** The request does not have valid authentication credentials for the
108+
operation. */
109+
Unauthenticated = 16
110+
};
111+
112+
} // namespace firestore
113+
} // namespace firebase
114+
115+
#endif // FIRESTORE_CORE_INCLUDE_FIREBASE_FIRESTORE_FIRESTORE_ERRORS_H_

0 commit comments

Comments
 (0)