Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewGolinkService ¶
func NewGolinkService(repo Repository) golinkv1connect.GolinkServiceHandler
Types ¶
type API ¶
func New ¶
func New( golinkSvc golinkv1connect.GolinkServiceHandler, port, pathPrefix string, allowedOrigins []string, interceptors []connect.Interceptor, debug bool, ) API
type Repository ¶
type Repository interface { Transaction(ctx context.Context, f func(ctx context.Context, tx *firestore.Transaction) error) error TxExists(ctx context.Context, tx *firestore.Transaction, name string) (bool, error) Get(ctx context.Context, name string) (*dto, error) TxGet(ctx context.Context, tx *firestore.Transaction, name string) (*dto, error) TxCreate(ctx context.Context, tx *firestore.Transaction, dto *dto) error ListByOwner(ctx context.Context, owner string) ([]*dto, error) ListByURL(ctx context.Context, url string) ([]*dto, error) TxUpdate(ctx context.Context, tx *firestore.Transaction, dto *dto) error TxDelete(ctx context.Context, tx *firestore.Transaction, name string) error TxAddOwner(ctx context.Context, tx *firestore.Transaction, name string, owner string) error TxRemoveOwner(ctx context.Context, tx *firestore.Transaction, name string, owner string) error }
func NewRepository ¶
func NewRepository(c *firestore.Client) Repository
Click to show internal directories.
Click to hide internal directories.