Documentation ¶
Index ¶
- Constants
- func NewClientRedis(db int) *redis.Client
- func NewLogger() *log.Entry
- func NewMYSQL(host string) (*sql.DB, error)
- func NewPSQL(host string) (*sql.DB, error)
- type Arango
- func (a *Arango) CreateCollections(ctx context.Context, collections []Collection) error
- func (a *Arango) CreateCursorWithIdAndTime(id string, createdAt time.Time) string
- func (a *Arango) CreateGraph(ctx context.Context, graph *Graph) error
- func (a *Arango) DB() driver.Database
- func (a *Arango) EnhanceBindVarsWithIdTimeCursor(bindVars map[string]interface{}, pagination Pagination) (map[string]interface{}, error)
- func (a *Arango) GetIDTimeCursor(cursor string) (string, time.Time, error)
- func (a *Arango) InitDB(ctx context.Context) error
- type Collection
- type DriverName
- type Edge
- type FullTextIndex
- type GRPCServer
- type GeoIndex
- type Graph
- type HashIndex
- type Index
- type IndexType
- type OptionArango
- type OptionServer
- type Pagination
- type Server
- type TTLIndex
Constants ¶
View Source
const ( ErrDuplicate = 1207 ErrGraphDuplicate = 1925 ErrCollectionAlreadyInGraph = 1938 ErrCollectionAlreadyInEdgeGraph = 1929 ErrEdgeAlreadyInGraph = 1920 )
For more info in regard of this error codes go to https://www.arangodb.com/docs/stable/appendix-error-codes.html
Variables ¶
This section is empty.
Functions ¶
func NewClientRedis ¶ added in v0.4.0
func NewClientRedis(db int) *redis.Client
Types ¶
type Arango ¶ added in v0.8.0
type Arango struct {
// contains filtered or unexported fields
}
func NewArango ¶ added in v0.8.0
func NewArango(db string, endpoints []string, user, password string, options ...OptionArango) *Arango
func (*Arango) CreateCollections ¶ added in v0.8.1
func (a *Arango) CreateCollections(ctx context.Context, collections []Collection) error
func (*Arango) CreateCursorWithIdAndTime ¶ added in v0.10.0
CreateCursorWithIdAndTime gets a cursor using the Id and createdAt
func (*Arango) CreateGraph ¶ added in v0.8.1
func (*Arango) EnhanceBindVarsWithIdTimeCursor ¶ added in v0.10.0
func (a *Arango) EnhanceBindVarsWithIdTimeCursor(bindVars map[string]interface{}, pagination Pagination) (map[string]interface{}, error)
EnhanceBinVarsWithIdTimeCursor adds an extra set of bindVars used for pagination and adds a limit to the pagination
func (*Arango) GetIDTimeCursor ¶ added in v0.10.0
type Collection ¶ added in v0.8.0
type DriverName ¶
type DriverName string
const ( Postgres DriverName = "postgres" Mysql DriverName = "mysql" )
type FullTextIndex ¶ added in v0.9.1
func (FullTextIndex) Fields ¶ added in v0.9.1
func (g FullTextIndex) Fields() []string
func (FullTextIndex) Name ¶ added in v0.9.1
func (g FullTextIndex) Name() string
type GRPCServer ¶ added in v0.5.0
type GRPCServer struct {
// contains filtered or unexported fields
}
func NewGRPCServer ¶ added in v0.5.0
func NewGRPCServer() *GRPCServer
func (*GRPCServer) ListenAddress ¶ added in v0.5.0
func (s *GRPCServer) ListenAddress() string
func (*GRPCServer) Server ¶ added in v0.5.0
func (s *GRPCServer) Server() *grpc.Server
type Graph ¶ added in v0.8.0
type Graph struct { Name string Edges []Edge Vertexes []Collection }
type OptionArango ¶ added in v0.8.0
type OptionArango func(*Arango)
type OptionServer ¶
type OptionServer func(*Server)
func OptionErrorLogWriter ¶
func OptionErrorLogWriter(log io.Writer) OptionServer
type Pagination ¶ added in v0.10.0
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) ListenAndServe ¶
Click to show internal directories.
Click to hide internal directories.