Documentation
¶
Index ¶
- Constants
- Variables
- type AccountRevokeInput
- type ApplyWriteResult
- type Args
- type BlockstoreVariant
- type ComAtprotoIdentityUpdateHandleRequest
- type ComAtprotoLabelQueryLabelsResponse
- type ComAtprotoRepoApplyWritesInput
- type ComAtprotoRepoApplyWritesItem
- type ComAtprotoRepoApplyWritesOutput
- type ComAtprotoRepoCreateRecordInput
- type ComAtprotoRepoDeleteRecordInput
- type ComAtprotoRepoDescribeRepoResponse
- type ComAtprotoRepoGetRecordResponse
- type ComAtprotoRepoListMissingBlobsRecordBlob
- type ComAtprotoRepoListMissingBlobsResponse
- type ComAtprotoRepoListRecordsRecordItem
- type ComAtprotoRepoListRecordsRequest
- type ComAtprotoRepoListRecordsResponse
- type ComAtprotoRepoPutRecordInput
- type ComAtprotoRepoUploadBlobResponse
- type ComAtprotoRequestEmailUpdateResponse
- type ComAtprotoServerActivateAccountRequest
- type ComAtprotoServerCheckAccountStatusResponse
- type ComAtprotoServerConfirmEmailRequest
- type ComAtprotoServerCreateAccountRequest
- type ComAtprotoServerCreateAccountResponse
- type ComAtprotoServerCreateInviteCodeRequest
- type ComAtprotoServerCreateInviteCodeResponse
- type ComAtprotoServerCreateInviteCodesItem
- type ComAtprotoServerCreateInviteCodesRequest
- type ComAtprotoServerCreateInviteCodesResponse
- type ComAtprotoServerCreateSessionRequest
- type ComAtprotoServerCreateSessionResponse
- type ComAtprotoServerDeactivateAccountRequest
- type ComAtprotoServerDeleteAccountRequest
- type ComAtprotoServerDescribeServerResponse
- type ComAtprotoServerDescribeServerResponseContact
- type ComAtprotoServerDescribeServerResponseLinks
- type ComAtprotoServerGetSessionResponse
- type ComAtprotoServerRefreshSessionResponse
- type ComAtprotoServerRequestPasswordResetRequest
- type ComAtprotoServerResetPasswordRequest
- type ComAtprotoServerUpdateEmailRequest
- type ComAtprotoSignPlcOperationRequest
- type ComAtprotoSignPlcOperationResponse
- type ComAtprotoSubmitPlcOperationRequest
- type ComAtprotoSyncGetBlocksRequest
- type ComAtprotoSyncGetLatestCommitResponse
- type ComAtprotoSyncGetRepoStatusResponse
- type ComAtprotoSyncListBlobsResponse
- type ComAtprotoSyncListReposRepoItem
- type ComAtprotoSyncListReposResponse
- type CustomValidator
- type ES256KSigningMethod
- type FirehoseOp
- type Label
- type MarshalableMap
- type OauthAuthorizationMetadata
- type OauthAuthorizePostRequest
- type OauthJwksResponse
- type OauthParResponse
- type OauthSigninInput
- type OauthTokenRequest
- type OauthTokenResponse
- type Op
- type OpType
- type RepoCommit
- type RepoMan
- type S3Config
- type Server
- type ServerGetServiceAuthRequest
- type ServerReserveSigningKeyRequest
- type ServerReserveSigningKeyResponse
- type Session
- type TemplateRenderer
- type ValidationError
Constants ¶
View Source
const (
AccountSessionMaxAge = 30 * 24 * time.Hour // one week
)
View Source
const (
BlockstoreVariantSqlite = iota
)
Variables ¶
View Source
var ( OpTypeCreate = OpType("com.atproto.repo.applyWrites#create") OpTypeUpdate = OpType("com.atproto.repo.applyWrites#update") OpTypeDelete = OpType("com.atproto.repo.applyWrites#delete") )
View Source
var (
CocoonSupportedScopes = []string{
"atproto",
"transition:email",
"transition:generic",
"transition:chat.bsky",
}
)
Functions ¶
This section is empty.
Types ¶
type AccountRevokeInput ¶ added in v0.7.2
type AccountRevokeInput struct {
Token string `form:"token"`
}
type ApplyWriteResult ¶
type ApplyWriteResult struct {
Type *string `json:"$type,omitempty"`
Uri *string `json:"uri,omitempty"`
Cid *string `json:"cid,omitempty"`
Commit *RepoCommit `json:"commit,omitempty"`
ValidationStatus *string `json:"validationStatus,omitempty"`
}
type Args ¶
type Args struct {
Logger *slog.Logger
Addr string
DbName string
DbType string
DatabaseURL string
Version string
Did string
Hostname string
RotationKeyPath string
JwkPath string
ContactEmail string
Relays []string
AdminPassword string
RequireInvite bool
SmtpUser string
SmtpPass string
SmtpHost string
SmtpPort string
SmtpEmail string
SmtpName string
S3Config *S3Config
SessionSecret string
BlockstoreVariant BlockstoreVariant
FallbackProxy string
}
type BlockstoreVariant ¶
type BlockstoreVariant int
func MustReturnBlockstoreVariant ¶
func MustReturnBlockstoreVariant(maybeBsv string) BlockstoreVariant
type ComAtprotoIdentityUpdateHandleRequest ¶
type ComAtprotoIdentityUpdateHandleRequest struct {
Handle string `json:"handle" validate:"atproto-handle"`
}
type ComAtprotoLabelQueryLabelsResponse ¶ added in v0.7.1
type ComAtprotoRepoApplyWritesInput ¶ added in v0.7.2
type ComAtprotoRepoApplyWritesInput struct {
Repo string `json:"repo" validate:"required,atproto-did"`
Validate *bool `json:"bool,omitempty"`
Writes []ComAtprotoRepoApplyWritesItem `json:"writes"`
SwapCommit *string `json:"swapCommit"`
}
type ComAtprotoRepoApplyWritesItem ¶
type ComAtprotoRepoApplyWritesItem struct {
Type string `json:"$type"`
Collection string `json:"collection"`
Rkey string `json:"rkey"`
Value *MarshalableMap `json:"value,omitempty"`
}
type ComAtprotoRepoApplyWritesOutput ¶ added in v0.7.2
type ComAtprotoRepoApplyWritesOutput struct {
Commit RepoCommit `json:"commit"`
Results []ApplyWriteResult `json:"results"`
}
type ComAtprotoRepoCreateRecordInput ¶ added in v0.7.2
type ComAtprotoRepoCreateRecordInput struct {
Repo string `json:"repo" validate:"required,atproto-did"`
Collection string `json:"collection" validate:"required,atproto-nsid"`
Rkey *string `json:"rkey,omitempty"`
Validate *bool `json:"bool,omitempty"`
Record MarshalableMap `json:"record" validate:"required"`
SwapRecord *string `json:"swapRecord"`
SwapCommit *string `json:"swapCommit"`
}
type ComAtprotoRepoDeleteRecordInput ¶ added in v0.7.2
type ComAtprotoRepoDeleteRecordInput struct {
Repo string `json:"repo" validate:"required,atproto-did"`
Collection string `json:"collection" validate:"required,atproto-nsid"`
Rkey string `json:"rkey" validate:"required,atproto-rkey"`
SwapRecord *string `json:"swapRecord"`
SwapCommit *string `json:"swapCommit"`
}
type ComAtprotoRepoListMissingBlobsRecordBlob ¶ added in v0.6.0
type ComAtprotoRepoListMissingBlobsResponse ¶ added in v0.6.0
type ComAtprotoRepoListMissingBlobsResponse struct {
Cursor *string `json:"cursor,omitempty"`
Blobs []ComAtprotoRepoListMissingBlobsRecordBlob `json:"blobs"`
}
type ComAtprotoRepoListRecordsResponse ¶
type ComAtprotoRepoListRecordsResponse struct {
Cursor *string `json:"cursor,omitempty"`
Records []ComAtprotoRepoListRecordsRecordItem `json:"records"`
}
type ComAtprotoRepoPutRecordInput ¶ added in v0.7.2
type ComAtprotoRepoPutRecordInput struct {
Repo string `json:"repo" validate:"required,atproto-did"`
Collection string `json:"collection" validate:"required,atproto-nsid"`
Rkey string `json:"rkey" validate:"required,atproto-rkey"`
Validate *bool `json:"bool,omitempty"`
Record MarshalableMap `json:"record" validate:"required"`
SwapRecord *string `json:"swapRecord"`
SwapCommit *string `json:"swapCommit"`
}
type ComAtprotoRequestEmailUpdateResponse ¶
type ComAtprotoRequestEmailUpdateResponse struct {
TokenRequired bool `json:"tokenRequired"`
}
type ComAtprotoServerCheckAccountStatusResponse ¶
type ComAtprotoServerCheckAccountStatusResponse struct {
Activated bool `json:"activated"`
ValidDid bool `json:"validDid"`
RepoCommit string `json:"repoCommit"`
RepoRev string `json:"repoRev"`
RepoBlocks int64 `json:"repoBlocks"`
IndexedRecords int64 `json:"indexedRecords"`
PrivateStateValues int64 `json:"privateStateValues"`
ExpectedBlobs int64 `json:"expectedBlobs"`
ImportedBlobs int64 `json:"importedBlobs"`
}
type ComAtprotoServerCreateAccountRequest ¶
type ComAtprotoServerCreateAccountRequest struct {
Email string `json:"email" validate:"required,email"`
Handle string `json:"handle" validate:"required,atproto-handle"`
Did *string `json:"did" validate:"atproto-did"`
Password string `json:"password" validate:"required"`
InviteCode string `json:"inviteCode" validate:"omitempty"`
}
type ComAtprotoServerCreateInviteCodeResponse ¶
type ComAtprotoServerCreateInviteCodeResponse struct {
Code string `json:"code"`
}
type ComAtprotoServerCreateInviteCodesResponse ¶
type ComAtprotoServerCreateInviteCodesResponse []ComAtprotoServerCreateInviteCodesItem
type ComAtprotoServerCreateSessionResponse ¶
type ComAtprotoServerCreateSessionResponse struct {
AccessJwt string `json:"accessJwt"`
RefreshJwt string `json:"refreshJwt"`
Handle string `json:"handle"`
Did string `json:"did"`
Email string `json:"email"`
EmailConfirmed bool `json:"emailConfirmed"`
EmailAuthFactor bool `json:"emailAuthFactor"`
Active bool `json:"active"`
Status *string `json:"status,omitempty"`
}
type ComAtprotoServerDeleteAccountRequest ¶ added in v0.7.0
type ComAtprotoServerDescribeServerResponse ¶
type ComAtprotoServerDescribeServerResponse struct {
InviteCodeRequired bool `json:"inviteCodeRequired"`
PhoneVerificationRequired bool `json:"phoneVerificationRequired"`
AvailableUserDomains []string `json:"availableUserDomains"`
Links ComAtprotoServerDescribeServerResponseLinks `json:"links"`
Contact ComAtprotoServerDescribeServerResponseContact `json:"contact"`
Did string `json:"did"`
}
type ComAtprotoServerDescribeServerResponseContact ¶
type ComAtprotoServerDescribeServerResponseContact struct {
Email string `json:"email"`
}
type ComAtprotoServerRequestPasswordResetRequest ¶
type ComAtprotoServerRequestPasswordResetRequest struct {
Email string `json:"email" validate:"required"`
}
type ComAtprotoSyncListReposResponse ¶
type ComAtprotoSyncListReposResponse struct {
Cursor *string `json:"cursor,omitempty"`
Repos []ComAtprotoSyncListReposRepoItem `json:"repos"`
}
type CustomValidator ¶
type CustomValidator struct {
// contains filtered or unexported fields
}
func (*CustomValidator) Validate ¶
func (cv *CustomValidator) Validate(i any) error
type ES256KSigningMethod ¶
type ES256KSigningMethod struct {
// contains filtered or unexported fields
}
func (*ES256KSigningMethod) Alg ¶
func (m *ES256KSigningMethod) Alg() string
type MarshalableMap ¶
func (*MarshalableMap) MarshalCBOR ¶
func (mm *MarshalableMap) MarshalCBOR(w io.Writer) error
type OauthAuthorizationMetadata ¶
type OauthAuthorizationMetadata struct {
Issuer string `json:"issuer"`
RequestParameterSupported bool `json:"request_parameter_supported"`
RequestUriParameterSupported bool `json:"request_uri_parameter_supported"`
RequireRequestUriRegistration *bool `json:"require_request_uri_registration,omitempty"`
ScopesSupported []string `json:"scopes_supported"`
SubjectTypesSupported []string `json:"subject_types_supported"`
ResponseTypesSupported []string `json:"response_types_supported"`
ResponseModesSupported []string `json:"response_modes_supported"`
GrantTypesSupported []string `json:"grant_types_supported"`
CodeChallengeMethodsSupported []string `json:"code_challenge_methods_supported"`
UILocalesSupported []string `json:"ui_locales_supported"`
DisplayValuesSupported []string `json:"display_values_supported"`
RequestObjectSigningAlgValuesSupported []string `json:"request_object_signing_alg_values_supported"`
AuthorizationResponseISSParameterSupported bool `json:"authorization_response_iss_parameter_supported"`
RequestObjectEncryptionAlgValuesSupported []string `json:"request_object_encryption_alg_values_supported"`
RequestObjectEncryptionEncValuesSupported []string `json:"request_object_encryption_enc_values_supported"`
JwksUri string `json:"jwks_uri"`
AuthorizationEndpoint string `json:"authorization_endpoint"`
TokenEndpoint string `json:"token_endpoint"`
TokenEndpointAuthMethodsSupported []string `json:"token_endpoint_auth_methods_supported"`
TokenEndpointAuthSigningAlgValuesSupported []string `json:"token_endpoint_auth_signing_alg_values_supported"`
RevocationEndpoint string `json:"revocation_endpoint"`
IntrospectionEndpoint string `json:"introspection_endpoint"`
PushedAuthorizationRequestEndpoint string `json:"pushed_authorization_request_endpoint"`
RequirePushedAuthorizationRequests bool `json:"require_pushed_authorization_requests"`
DpopSigningAlgValuesSupported []string `json:"dpop_signing_alg_values_supported"`
ProtectedResources []string `json:"protected_resources"`
ClientIDMetadataDocumentSupported bool `json:"client_id_metadata_document_supported"`
}
type OauthJwksResponse ¶
type OauthJwksResponse struct {
Keys []any `json:"keys"`
}
type OauthParResponse ¶
type OauthSigninInput ¶ added in v0.7.2
type OauthTokenRequest ¶
type OauthTokenRequest struct {
provider.AuthenticateClientRequestBase
GrantType string `form:"grant_type" json:"grant_type"`
Code *string `form:"code" json:"code,omitempty"`
CodeVerifier *string `form:"code_verifier" json:"code_verifier,omitempty"`
RedirectURI *string `form:"redirect_uri" json:"redirect_uri,omitempty"`
RefreshToken *string `form:"refresh_token" json:"refresh_token,omitempty"`
}
type OauthTokenResponse ¶
type RepoCommit ¶
type ServerReserveSigningKeyRequest ¶ added in v0.7.0
type ServerReserveSigningKeyRequest struct {
Did *string `json:"did"`
}
type ServerReserveSigningKeyResponse ¶ added in v0.7.0
type ServerReserveSigningKeyResponse struct {
SigningKey string `json:"signingKey"`
}
type TemplateRenderer ¶
type TemplateRenderer struct {
// contains filtered or unexported fields
}
type ValidationError ¶
Source Files
¶
- blockstore_variant.go
- common.go
- handle_account.go
- handle_account_revoke.go
- handle_account_signin.go
- handle_account_signout.go
- handle_actor_get_preferences.go
- handle_actor_put_preferences.go
- handle_health.go
- handle_identity_get_recommended_did_credentials.go
- handle_identity_request_plc_operation.go
- handle_identity_sign_plc_operation.go
- handle_identity_submit_plc_operation.go
- handle_identity_update_handle.go
- handle_import_repo.go
- handle_label_query_labels.go
- handle_oauth_authorize.go
- handle_oauth_jwks.go
- handle_oauth_par.go
- handle_oauth_token.go
- handle_proxy.go
- handle_proxy_get_feed.go
- handle_repo_apply_writes.go
- handle_repo_create_record.go
- handle_repo_delete_record.go
- handle_repo_describe_repo.go
- handle_repo_get_record.go
- handle_repo_list_missing_blobs.go
- handle_repo_list_records.go
- handle_repo_list_repos.go
- handle_repo_put_record.go
- handle_repo_upload_blob.go
- handle_robots.go
- handle_root.go
- handle_server_activate_account.go
- handle_server_check_account_status.go
- handle_server_confirm_email.go
- handle_server_create_account.go
- handle_server_create_invite_code.go
- handle_server_create_invite_codes.go
- handle_server_create_session.go
- handle_server_deactivate_account.go
- handle_server_delete_account.go
- handle_server_delete_session.go
- handle_server_describe_server.go
- handle_server_get_service_auth.go
- handle_server_get_session.go
- handle_server_refresh_session.go
- handle_server_request_account_delete.go
- handle_server_request_email_confirmation.go
- handle_server_request_email_update.go
- handle_server_request_password_reset.go
- handle_server_reserve_signing_key.go
- handle_server_reset_password.go
- handle_server_resolve_handle.go
- handle_server_update_email.go
- handle_sync_get_blob.go
- handle_sync_get_blocks.go
- handle_sync_get_latest_commit.go
- handle_sync_get_record.go
- handle_sync_get_repo.go
- handle_sync_get_repo_status.go
- handle_sync_list_blobs.go
- handle_sync_subscribe_repos.go
- handle_well_known.go
- mail.go
- middleware.go
- repo.go
- server.go
- service_auth.go
- session.go
Click to show internal directories.
Click to hide internal directories.