{"modulePath":"github.com/stickychin/code-server","version":"v0.0.0-20250522011653-c6effd41c6ef","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package balance\n\n## Variables\n\n```go\nvar (\n\tErrCheckpointNotFound = errors.New(\"checkpoint not found\")\n\n\tErrStaleCheckpoint = errors.New(\"checkpoint is stale\")\n)\n```\n\n## Types\n\n```go\ntype Record struct {\n\tId uint64\n\n\tTokenAccount   string\n\tQuarks         uint64\n\tSlotCheckpoint uint64\n\n\tLastUpdatedAt time.Time\n}\n```\nNote: Only supports external balances\n\n```go\nfunc (r *Record) Clone() Record\n```\n\n```go\nfunc (r *Record) CopyTo(dst *Record)\n```\n\n```go\nfunc (r *Record) Validate() error\n```\n\n```go\ntype Store interface {\n\t// SaveCheckpoint saves a balance at a checkpoint. ErrStaleCheckpoint is returned\n\t// if the checkpoint is outdated\n\tSaveCheckpoint(ctx context.Context, record *Record) error\n\n\t// GetCheckpoint gets a balance checkpoint for a given account. ErrCheckpointNotFound\n\t// is returend if no DB record exists.\n\tGetCheckpoint(ctx context.Context, account string) (*Record, error)\n}\n```\n\n","path":"github.com/stickychin/code-server/pkg/code/data/balance","name":"balance","synopsis":"","isRedistributable":true}
