Versions in this module Expand all Collapse all v0 v0.1.0 Sep 5, 2026 Changes in this version + const ErrorMessageAuthenticationOperationSuperseded + const ErrorMessageAuthenticationSessionChanged + const ErrorMessageBrowserSessionCoordinationRequired + const ErrorMessageCustomerAuthenticationCookieInvalid + const ErrorMessageCustomerSessionRequired + const ErrorMessageExpectedSessionScopeInvalid + const ErrorMessageGithubOauthBrowserCompletionInvalid + const ErrorMessageGithubOauthBrowserOriginInvalid + const ErrorMessageGithubOauthBrowserStateInvalid + const ErrorMessageGithubOauthBrowserTransitionUnavailable + const ErrorMessageGithubOauthCallbackInvalid + const ErrorMessageGithubOauthNonceCookieRequired + const ErrorMessageGithubOauthSessionSnapshotInvalid + const ErrorMessageGithubOauthStateInvalid + func IsChikStorageUploadCommitUnknownError(err error) bool + func WithAuthenticationRetry(ctx context.Context) context.Context + type Auth = ChikAuth + type AuthActionAccepted = ChikAuthActionAccepted + type AuthError = ChikAuthError + type AuthSession = ChikAuthSession + type AuthUser = ChikAuthUser + type BidiStream struct + func (stream *BidiStream) Close() error + func (stream *BidiStream) CloseSend() error + func (stream *BidiStream) Receive(response any) error + func (stream *BidiStream) Send(request any) error + type ChikAuth struct + func (auth *ChikAuth) AdoptSession(ctx context.Context, session *ChikAuthSession) error + func (auth *ChikAuth) GetSession(ctx context.Context) (*ChikAuthSession, error) + func (auth *ChikAuth) OnAppForeground(ctx context.Context) (*ChikAuthSession, error) + func (auth *ChikAuth) RefreshSession(ctx context.Context) (*ChikAuthSession, error) + func (auth *ChikAuth) RequestEmailVerification(ctx context.Context) (*ChikAuthActionAccepted, error) + func (auth *ChikAuth) RequestPasswordReset(ctx context.Context, email string) (*ChikAuthActionAccepted, error) + func (auth *ChikAuth) ResetPassword(ctx context.Context, token, password string) (*ChikAuthUser, error) + func (auth *ChikAuth) RestoreSession(ctx context.Context) (*ChikAuthSession, error) + func (auth *ChikAuth) SignIn(ctx context.Context, email, password string) (*ChikAuthSession, error) + func (auth *ChikAuth) SignInCustom(ctx context.Context, providerKey, credential string) (*ChikAuthSession, error) + func (auth *ChikAuth) SignOut(ctx context.Context) (*ChikSignOutResult, error) + func (auth *ChikAuth) SignUp(ctx context.Context, email, password string) (*ChikAuthUser, error) + func (auth *ChikAuth) StartGitHub(ctx context.Context, returnTo string) (*ChikOAuthStart, error) + func (auth *ChikAuth) StartGitHubNative(ctx context.Context) (*ChikNativeGitHubOAuthTransaction, error) + func (auth *ChikAuth) VerifyEmail(ctx context.Context, token string) (*ChikAuthUser, error) + type ChikAuthActionAccepted struct + Accepted bool + ExpiresAt string + type ChikAuthError struct + Cause error + Code ErrorCode + HTTPStatus int + Message string + RawCode string + RetryAfterSeconds int + func (err *ChikAuthError) Error() string + func (err *ChikAuthError) Unwrap() error + type ChikAuthSession struct + ExpiresAt string + RefreshExpiresAt string + RefreshToken string + SessionToken string + User ChikAuthUser + type ChikAuthUser struct + CreatedAt string + Disabled bool + Email string + EmailVerified bool + ProjectID string + UserID string + type ChikNativeGitHubOAuthTransaction struct + AuthorizationURL string + ExpiresAt string + RedirectURI string + func (transaction *ChikNativeGitHubOAuthTransaction) Complete(ctx context.Context, redirect string) (*ChikAuthSession, error) + func (transaction *ChikNativeGitHubOAuthTransaction) MatchesRedirect(redirect string) bool + type ChikOAuthStart struct + AuthorizationURL string + type ChikRealtimeClient struct + func (client *ChikRealtimeClient) Connect(options ChikRealtimeConnectionOptions) *ChikRealtimeConnection + func (client *ChikRealtimeClient) Publish(ctx context.Context, channel string, payload any, token string) (*ChikRealtimePublishResult, error) + func (client *ChikRealtimeClient) Subscribe(channel string, options ChikRealtimeSubscribeOptions) (*ChikRealtimeSubscription, error) + type ChikRealtimeConnection struct + func (connection *ChikRealtimeConnection) Close() + func (connection *ChikRealtimeConnection) Subscribe(channel string, lastSeq int64) error + func (connection *ChikRealtimeConnection) Unsubscribe(channel string) error + type ChikRealtimeConnectionOptions struct + OnError func(ChikRealtimeProtocolError) + OnEvent func(ChikRealtimeEvent) + OnGap func(ChikRealtimeGap) + Token string + type ChikRealtimeEvent struct + Channel string + Payload json.RawMessage + Seq int64 + TS int64 + type ChikRealtimeGap struct + Channel string + LatestSeq int64 + OldestSeq int64 + type ChikRealtimeProtocolError struct + Cause error + Code ErrorCode + Message string + RawCode string + func (err ChikRealtimeProtocolError) Error() string + func (err ChikRealtimeProtocolError) Unwrap() error + type ChikRealtimePublishResult struct + Seq int64 + TS int64 + type ChikRealtimeSubscribeOptions struct + LastSeq int64 + OnError func(ChikRealtimeProtocolError) + OnEvent func(ChikRealtimeEvent) + OnGap func(ChikRealtimeGap) + Token string + type ChikRealtimeSubscription struct + func (subscription *ChikRealtimeSubscription) Close() + type ChikSessionManager struct + func (manager *ChikSessionManager) Adopt(ctx context.Context, session *ChikAuthSession) error + func (manager *ChikSessionManager) Clear(ctx context.Context) error + func (manager *ChikSessionManager) Current() *ChikAuthSession + func (manager *ChikSessionManager) Refresh(ctx context.Context) (*ChikAuthSession, error) + func (manager *ChikSessionManager) Restore(ctx context.Context) (*ChikAuthSession, error) + type ChikSessionStore interface + ClearSession func(context.Context) error + LoadSession func(context.Context) (*ChikAuthSession, error) + SaveSession func(context.Context, *ChikAuthSession) error + type ChikSignOutResult struct + SignedOut bool + type ChikStorageAPIError struct + Cause error + Code ErrorCode + HTTPStatus int + Message string + RawCode string + func (err *ChikStorageAPIError) Error() string + func (err *ChikStorageAPIError) Unwrap() error + type ChikStorageClient struct + func (client *ChikStorageClient) CreateUpload(ctx context.Context, input ChikStorageCreateUploadInput) (*ChikStorageUpload, error) + func (client *ChikStorageClient) GetDownloadURL(ctx context.Context, input ChikStorageDownloadInput) (*ChikStorageDownloadURL, error) + func (client *ChikStorageClient) GetPublicURL(input ChikStoragePublicURLInput) string + type ChikStorageCreateUploadInput struct + Bucket string + ContentSHA256 string + ContentType string + ExpiresInSeconds int + IdempotencyKey string + Key string + Size int64 + type ChikStorageDownloadInput struct + Bucket string + ExpiresInSeconds int + Key string + type ChikStorageDownloadURL struct + ExpiresAt string + URL string + type ChikStoragePublicURLInput struct + Bucket string + Key string + type ChikStorageUpload struct + ExpiresAt string + ID string + func (upload *ChikStorageUpload) Abort(ctx context.Context) error + func (upload *ChikStorageUpload) Complete(ctx context.Context) (json.RawMessage, error) + func (upload *ChikStorageUpload) Put(ctx context.Context, body io.Reader) error + type ChikStorageUploadCommitUnknownError struct + Cause error + Code ErrorCode + HTTPStatus int + Message string + UploadID string + func (err *ChikStorageUploadCommitUnknownError) Error() string + func (err *ChikStorageUploadCommitUnknownError) Unwrap() error + type ChikStreamDecoder struct + func (decoder *ChikStreamDecoder) Close() error + func (decoder *ChikStreamDecoder) Next(message any) error + type ChikStreamSender struct + func (sender *ChikStreamSender) Close() error + func (sender *ChikStreamSender) CloseAndReceive() (*ChikStreamDecoder, error) + func (sender *ChikStreamSender) CloseAndReceiveUnary(response any) error + func (sender *ChikStreamSender) Send(message any) error + type Client struct + func NewClient(origin string, options Options) (*Client, error) + func (client *Client) Auth() *Auth + func (client *Client) BidiStream(ctx context.Context, service, method string) (*BidiStream, error) + func (client *Client) ClientStream(ctx context.Context, service, method string) (*StreamSender, error) + func (client *Client) JSON(ctx context.Context, operation Operation, values []string, payload any, ...) ([]byte, error) + func (client *Client) Origin() string + func (client *Client) Raw(ctx context.Context, operation Operation, values []string, body RawBody, ...) ([]byte, error) + func (client *Client) Realtime() *Realtime + func (client *Client) ServerStream(ctx context.Context, service, method string, request any) (*StreamDecoder, error) + func (client *Client) Session() *SessionManager + func (client *Client) Storage() *Storage + func (client *Client) Unary(ctx context.Context, service, method string, request, response any) error + type Error struct + Cause error + Code ErrorCode + HTTPStatus int + Message string + RawCode string + RetryAfterSeconds int + func (err *Error) Error() string + func (err *Error) Unwrap() error + type ErrorCode string + const ErrorCodeAborted + const ErrorCodeAlreadyExists + const ErrorCodeCanceled + const ErrorCodeChannelLimit + const ErrorCodeCommitUnknown + const ErrorCodeDataLoss + const ErrorCodeDeadlineExceeded + const ErrorCodeFailedPrecondition + const ErrorCodeFrameAuth + const ErrorCodeHalfClose + const ErrorCodeInternal + const ErrorCodeInvalidArgument + const ErrorCodeInvalidMultipartPart + const ErrorCodeInvalidMultipartPlan + const ErrorCodeInvalidResponse + const ErrorCodeInvalidUploadUrl + const ErrorCodeMultipartBodyRequired + const ErrorCodeNetworkFailure + const ErrorCodeNotFound + const ErrorCodeOutOfRange + const ErrorCodePayloadTooLarge + const ErrorCodePermissionDenied + const ErrorCodeResourceExhausted + const ErrorCodeResponseCredit + const ErrorCodeStorageError + const ErrorCodeUnauthenticated + const ErrorCodeUnauthorized + const ErrorCodeUnavailable + const ErrorCodeUnimplemented + const ErrorCodeUnknown + func ParseErrorCode(value string) ErrorCode + func ParseWireErrorCode(value string) (ErrorCode, string) + func (code ErrorCode) DefaultHTTPStatus() int + func (code ErrorCode) IsProtocol() bool + type ListValue struct + Values []T + type LiveQuery struct + func NewLiveQuery[T any](parent context.Context, client *Client, service, method string, request any, ...) (*LiveQuery[T], error) + func (query *LiveQuery[T]) Close() + func (query *LiveQuery[T]) Refetch(ctx context.Context) error + type LiveQueryOptions struct + OnError func(error) + OnSnapshot func(LiveQuerySnapshot[T]) + Token string + type LiveQuerySnapshot struct + Cursor *ReactiveCursor + Error error + Items []T + Pending bool + Version int64 + type NativeGitHubOAuthTransaction = ChikNativeGitHubOAuthTransaction + type OAuthStart = ChikOAuthStart + type Operation struct + Method string + Path string + type Options struct + APIKey string + APIName string + HTTPClient *http.Client + Headers http.Header + RPCPath string + SessionStore ChikSessionStore + SessionToken string + type RawBody struct + ContentLength int64 + ContentType string + Reader io.Reader + type RawOperationOptions struct + Headers http.Header + type ReactiveCursor struct + Position string + Stream string + type Realtime = ChikRealtimeClient + type RealtimeConnection = ChikRealtimeConnection + type RealtimeConnectionOptions = ChikRealtimeConnectionOptions + type RealtimeEvent = ChikRealtimeEvent + type RealtimeGap = ChikRealtimeGap + type RealtimeProtocolError = ChikRealtimeProtocolError + type RealtimePublishResult = ChikRealtimePublishResult + type RealtimeSubscribeOptions = ChikRealtimeSubscribeOptions + type RealtimeSubscription = ChikRealtimeSubscription + type SessionManager = ChikSessionManager + type SessionStore = ChikSessionStore + type SignOutResult = ChikSignOutResult + type Storage = ChikStorageClient + type StorageCreateUploadInput = ChikStorageCreateUploadInput + type StorageDownloadInput = ChikStorageDownloadInput + type StorageDownloadURL = ChikStorageDownloadURL + type StorageError = ChikStorageAPIError + type StoragePublicURLInput = ChikStoragePublicURLInput + type StorageUpload = ChikStorageUpload + type StorageUploadCommitUnknownError = ChikStorageUploadCommitUnknownError + type StreamDecoder = ChikStreamDecoder + type StreamSender = ChikStreamSender