cursor

package
v0.0.75 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 22, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package cursor provides a way to encode and decode cursors for paginated queries

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeValue

func DecodeValue(value string) (string, error)

DecodeValue decodes a base64 encoded string into a string

func EncodeValue

func EncodeValue(value string) string

EncodeValue encodes a string into a base64 encoded string

Types

type ProviderCursor

type ProviderCursor struct {
	// CreatedAt is the creation time of the provider
	CreatedAt time.Time
}

ProviderCursor is the the creation time of the provider

func NewProviderCursor

func NewProviderCursor(encodedCursor string) (*ProviderCursor, error)

NewProviderCursor creates a new ProviderCursor from an encoded cursor

func (*ProviderCursor) String

func (c *ProviderCursor) String() string

type RepoCursor

type RepoCursor struct {
	ProjectId string
	Provider  string
	RepoId    int64
}

RepoCursor is a cursor for listing repositories

func NewRepoCursor

func NewRepoCursor(encodedCursor string) (*RepoCursor, error)

NewRepoCursor creates a new RepoCursor from an encoded cursor

func (*RepoCursor) String

func (c *RepoCursor) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL