Documentation ¶
Overview ¶
Package arangomigo allows the tool to execute from the command line.
Index ¶
- func PerformMigrations(ctx context.Context, c Config, ms []Migration) error
- func TriggerMigration(configAt string)
- type AQL
- type Action
- type Collection
- type Config
- type ConsolidationPolicy
- type Database
- type EdgeDefinition
- type FullTextIndex
- type GeoIndex
- type Graph
- type HashIndex
- type Migration
- type Operation
- type PairedMigrations
- type PersistentIndex
- type SearchElementProperties
- type SearchView
- type SkiplistIndex
- type SortField
- type StringArray
- type TTLIndex
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PerformMigrations ¶
func TriggerMigration ¶
func TriggerMigration(configAt string)
Types ¶
type Collection ¶
type Collection struct { Operation `yaml:",inline"` ShardKeys *[]string JournalSize *int NumberOfShards *int WaitForSync *bool AllowUserKeys *bool Volatile *bool Compactable *bool CollectionType string }
Collection the YAML struct for configuring a collection migration.
type Config ¶
type Config struct { Endpoints []string Username string Password string MigrationsPath StringArray Db string SkipSslVerify bool `yaml:"skip_ssl_verify"` // Extras allows the user to pass in replaced variables Extras map[string]interface{} }
Config The content of a migration configuration.
type ConsolidationPolicy ¶
type ConsolidationPolicy struct { // Type returns the type of the ConsolidationPolicy. Type string // Options contains the fields used by the ConsolidationPolicy and are related to the Type. Options map[string]interface{} }
ConsolidationPolicy holds threshold values specifying when to consolidate view data. see ArangoSearchConsolidationPolicy
ArangoSearchConsolidationPolicyTier ArangoSearchConsolidationPolicyBytesAccum
type Database ¶
type Database struct { Operation `yaml:",inline"` Allowed []User Disallowed []string // contains filtered or unexported fields }
Database the YAML struct for configuring a database migration.
type EdgeDefinition ¶
type EdgeDefinition struct { // The name of the edge collection to be used. Collection string `json:"collection"` // To contains the names of one or more edge collections that can contain target vertices. To []string `json:"to"` // From contains the names of one or more vertex collections that can contain source vertices. From []string `json:"from"` }
EdgeDefinition contains all information needed to define a single edge in a graph.
type FullTextIndex ¶
type FullTextIndex struct { Operation `yaml:",inline"` Fields []string Collection string MinLength int InBackground bool }
FullTextIndex defines how to build a full text index on a field
type GeoIndex ¶
type GeoIndex struct { Operation `yaml:",inline"` Fields []string Collection string GeoJSON bool InBackground bool }
GeoIndex creates a GeoIndex within the specified collection.
type Graph ¶
type Graph struct { Operation `yaml:",inline"` // Smart indicates that the graph uses the Enterprise // edition's graph management. Smart *bool // SmartGraphAttribute is the attribute used to shuffle vertexes. SmartGraphAttribute string // Shards is the number of shards each collection has. Shards int // OrphanVertex OrphanVertices []string // EdgeDifinition creates a single edge between vertexes EdgeDefinitions []EdgeDefinition // Names of Edge Collections to remove RemoveEdges []string // Names of vertices to re RemoveVertices []string }
Graph allows a user to manage graphs
type HashIndex ¶
type HashIndex struct { Operation `yaml:",inline"` Fields []string Collection string Unique bool Sparse bool NoDeduplicate bool InBackground bool }
HashIndex creates a hash index on the fields within the specified Collection.
type Migration ¶
type Migration interface { Migrate(ctx context.Context, driver driver.Database, extras map[string]interface{}) error FileName() string SetFileName(name string) CheckSum() string SetCheckSum(sum string) }
Migration all the operations necessary to modify a database, even make one.
type Operation ¶
type Operation struct { Type string Name string Action Action // contains filtered or unexported fields }
Operation the common elements for all migrations.
func (*Operation) SetCheckSum ¶
SetCheckSum sets the checksum of the file, in hex.
func (*Operation) SetFileName ¶
SetFileName updates the filename of the migration
type PairedMigrations ¶
type PairedMigrations struct {
// contains filtered or unexported fields
}
PairedMigrations Defines the primary change and an undo operation if provided. Presently undo is not a supported feature. After reading Flyway's history of the feature, it might never be supported
type PersistentIndex ¶
type PersistentIndex struct { Operation `yaml:",inline"` Fields []string Collection string Unique bool Sparse bool InBackground bool StoredValues []string }
PersistentIndex creates a persistent index on the collections' fields.
type SearchElementProperties ¶
type SearchElementProperties struct { // Name of the element (e.g. collection name) Name string // The list of analyzers to be used for indexing of string values. Defaults to ["identify"]. // NOTE: They much be defined in Arango. Analyzers []string `yaml:"analyzers,omitempty"` // Fields contains the properties for individual fields of the element. Fields []SearchElementProperties `yaml:"fields,omitempty"` // If set to true, all fields of this element will be indexed. Defaults to false. IncludeAllFields *bool `yaml:"includeAllFields,omitempty"` // This values specifies how the view should track values. // see ArangoSearchStoreValues StoreValues *string `yaml:"storeValues,omitempty"` // If set to true, values in a listed are treated as separate values. Defaults to false. TrackListPositions *bool `yaml:"trackListPositions,omitempty"` }
SearchElementProperties contains properties that specify how an element is indexed in an ArangoSearch view. Note that this structure is recursive. Settings not specified (nil) at a given level will inherit their setting from a lower level.
type SearchView ¶
type SearchView struct { Operation `yaml:",inline"` // CleanupIntervalStep specifies the minimum number of commits to wait between // removing unused files in the data directory. CleanupIntervalStep *int64 `yaml:"cleanupIntervalStep,omitempty"` // CommitInterval ArangoSearch waits at least this many milliseconds between committing // view data store changes and making documents visible to queries CommitIntervalMsec *int64 `yaml:"commitIntervalMsec,omitempty"` // ConsolidationInterval specifies the minimum number of milliseconds that must be waited // between committing index data changes and making them visible to queries. ConsolidationIntervalMsec *int64 `yaml:"consolidationIntervalMsec,omitempty"` // ConsolidationPolicy specifies thresholds for consolidation. ConsolidationPolicy *ConsolidationPolicy `yaml:"consolidationPolicy,omitempty"` // SortFields lists the fields that used for sorting. SortFields []SortField `yaml:"primarySort,omitempty"` // Links contains the properties for how individual collections // are indexed in thie view. Links []SearchElementProperties `yaml:"links,omitempty"` }
SearchView contains all the information needed to create an Arango Search SearchView.
type SkiplistIndex ¶
type SkiplistIndex struct { Operation `yaml:",inline"` Fields []string Collection string Unique bool Sparse bool NoDeduplicate bool InBackground bool }
SkiplistIndex creates a sliplist index on the collections' fields.
type SortField ¶
type SortField struct { // The name of the field. Field string // Whether the field is ascending or descending. Ascending *bool `yaml:"ascending,omitempty"` }
SortField describes a field and whether its ascending or not used for primary search.
type StringArray ¶
type StringArray []string
func (*StringArray) UnmarshalYAML ¶
func (a *StringArray) UnmarshalYAML(unmarshal func(interface{}) error) error
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
arangomigo
Package main allows the tool to execute from the command line.
|
Package main allows the tool to execute from the command line. |