repository

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 19, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Repository Package follow the repository pattern https://www.c-sharpcorner.com/UploadFile/b1df45/getting-started-with-repository-pattern-using-C-Sharp/ It provides a generic interface to interact with our entities

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repo

type Repo interface {
	Create(ctx contractapi.TransactionContextInterface, entity interface{}, docPrefix string, keys []string) error
	Update(ctx contractapi.TransactionContextInterface, entity interface{}, docPrefix string, keys []string) error
	Get(ctx contractapi.TransactionContextInterface, docPrefix string, keys []string) (interface{}, error)
	GetQueryStringWithPagination(ctx contractapi.TransactionContextInterface, queryString string) (shim.StateQueryIteratorInterface, error)
	IsExist(ctx contractapi.TransactionContextInterface, docPrefix string, keys []string) (bool, error)
	GetQueryString(ctx contractapi.TransactionContextInterface, queryString string) (shim.StateQueryIteratorInterface, error)
}

We currently don't support delete function and getAll document There will not be any deletion. GetAll is quite dangerous as we never know what it can break.

Directories

Path Synopsis
The basic repository implementation use utility functions in akc-go-sdk
The basic repository implementation use utility functions in akc-go-sdk

Jump to

Keyboard shortcuts

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