이전 버전을 설치하려면 버전이 지정되지 않은 이전 패키지 이름에 명시적인 버전 한정자를 사용하세요.
# Notice the @v3 suffix.# This instructs Go tools to fetch the latest v3.x release of the SDK.gogetfirebase.google.com/go@v3
현재 모듈을 사용하지 않는 개발자
아직 모듈을 선택하지 않은 개발자는 버전이 지정되지 않은 패키지 이름을 사용하여 SDK를 계속 설치할 수 있습니다.
gogetfirebase.google.com/go
하지만 이 경우 다른 브레이킹 API 체인지가 포함된 최신 버전의 SDK (v4 이상)를 가져옵니다.
일반적인 오류 처리 변경사항
v4 SDK에는 플랫폼 수준의 오류 조건을 처리하는 함수를 제공하는 새로운 errorutils 패키지가 도입되었습니다. 백엔드 서비스 오류로 인해 오류가 발생한 경우 새로운 함수 errorutils.HTTPResponse()를 호출하여 원래 오류 응답에 액세스할 수 있습니다. SDK의 모든 API에서 반환되는 오류에 이 패키지의 함수를 사용할 수 있습니다.
Authentication API 변경사항
VerifyIDToken() 및 VerifySessionCookie() API와 함께 사용할 새로운 오류 처리 함수 추가됨:
IsIDTokenInvalid()
IsIDTokenExpired()
IsSessionCookieInvalid()
IsSessionCookieExpired()
IsCertificateFetchFailed()
지원 중단됨:
IsProjectNotFound()
IsUnknown()
IsInsufficientPermission()
IsInvalidEmail()
FCM API 변경사항
유형 messaging.WebpushFCMOptions의 이름을 messaging.WebpushFcmOptions로 변경했습니다.
추가됨:
IsThirdPartyAuthError()
IsQuotaExceeded()
IsSenderIDMismatch()
IsUnregistered()
IsUnavailable()
지원 중단됨:
IsInvalidAPNSCredentials()
IsMessageRateExceeded()
IsMismatchedCredential()
IsRegistrationTokenNotRegistered()
IsServerUnavailable()
IsTooManyTopics()
IsUnknown()
IID API 변경사항
현재 iid 패키지에 제공되는 모든 오류 처리 함수는 지원 중단되었습니다. 대신 errorutils 패키지에 제공되는 해당 오류 처리 함수를 사용하세요.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["필요한 정보가 없음","missingTheInformationINeed","thumb-down"],["너무 복잡함/단계 수가 너무 많음","tooComplicatedTooManySteps","thumb-down"],["오래됨","outOfDate","thumb-down"],["번역 문제","translationIssue","thumb-down"],["샘플/코드 문제","samplesCodeIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-09-04(UTC)"],[],[],null,["\u003cbr /\u003e\n\nStarting from version 4.0.0, the Firebase Admin SDK for Go has opted into\n[Go modules](https://github.com/golang/go/wiki/Modules). Also, there are breaking\nchanges in [error handling](/docs/reference/admin/error-handling) and semantics.\n\nInstallation changes\n\nConforming to [modules best practices](https://github.com/golang/go/wiki/Modules#semantic-import-versioning),\nthe SDK's major version has been appended to the package name. This\nchange results in the following package name updates:\n\n- firebase.google.com/go → firebase.google.com/go/v4\n- firebase.google.com/go/auth → firebase.google.com/go/v4/auth\n- firebase.google.com/go/db → firebase.google.com/go/v4/db\n- firebase.google.com/go/iid → firebase.google.com/go/v4/iid\n- firebase.google.com/go/messaging → firebase.google.com/go/v4/messaging\n\n| **Note:** Developers who are already using Go modules **must** use the new versioned package name when installing and importing the SDK.\n\nDevelopers already using modules\n\nUse the versioned package name to install the latest version of the SDK. \n\n # Install the latest version:\n go install firebase.google.com/go/v4@latest\n\n # Or install a specific version:\n go install firebase.google.com/go/v4@4.18.0\n\nThe same versioned package name must be used in the source code when importing\nthe SDK. \n\n package helloworld\n\n import (\n \"firebase.google.com/go/v4\"\n \"firebase.google.com/go/v4/auth\"\n \"firebase.google.com/go/v4/messaging\"\n )\n\nTo install an earlier version, use the old (unversioned) package name with an\nexplicit version qualifier. \n\n # Notice the @v3 suffix.\n # This instructs Go tools to fetch the latest v3.x release of the SDK.\n go get firebase.google.com/go@v3\n\nDevelopers not currently using modules\n\nDevelopers who haven't opted into modules yet can continue to install the SDK\nusing the unversioned package name. \n\n go get firebase.google.com/go\n\nNote, however, that this fetches the latest version of the SDK (v4 or later)\nwhich contains other breaking API changes.\n\nGeneral error handling changes\n\nThe v4 SDK introduces a new `errorutils` package that provides functions for\nhandling platform-level error conditions. In the event an error was caused by a\nbackend service error, you can access the original error response by calling\nthe new function `errorutils.HTTPResponse()`. You can use the functions in\nthis package with errors returned by any API in the SDK.\n\nAuthentication API changes\n\n- Added new error handling functions to be used in conjunction with `VerifyIDToken()` and `VerifySessionCookie()` APIs:\n - `IsIDTokenInvalid()`\n - `IsIDTokenExpired()`\n - `IsSessionCookieInvalid()`\n - `IsSessionCookieExpired()`\n - `IsCertificateFetchFailed()`\n- Deprecated:\n - `IsProjectNotFound()`\n - `IsUnknown()`\n - `IsInsufficientPermission()`\n - `IsInvalidEmail()`\n\nFCM API changes\n\n- Renamed the type `messaging.WebpushFCMOptions` to `messaging.WebpushFcmOptions`.\n- Added:\n - `IsThirdPartyAuthError()`\n - `IsQuotaExceeded()`\n - `IsSenderIDMismatch()`\n - `IsUnregistered()`\n - `IsUnavailable()`\n- Deprecated:\n - `IsInvalidAPNSCredentials()`\n - `IsMessageRateExceeded()`\n - `IsMismatchedCredential()`\n - `IsRegistrationTokenNotRegistered()`\n - `IsServerUnavailable()`\n - `IsTooManyTopics()`\n - `IsUnknown()`\n\nIID API changes\n\nAll error handling functions currently available in the `iid` package are now\ndeprecated. Use the corresponding error handling functions provided in the\n`errorutils` package instead."]]