Documentation ¶
Overview ¶
DO NOT EDIT THIS FILE. Generated by the ./script/release script.
Index ¶
- Constants
- func GoalKeywordsHelp() map[string]string
- func GoalSyntax() map[string]string
- func NewGoalContext(ariContext *Context, help Help, sqlDatabase *SQLDatabase) (*goal.Context, error)
- func NewHelp() map[string]map[string]string
- func SQLExec(sqlDatabase *SQLDatabase, sqlQuery string, args []any) (goal.V, error)
- func SQLKeywords() []string
- func SQLQueryContext(sqlDatabase *SQLDatabase, sqlQuery string, args []any) (goal.V, error)
- func VFGoalHelp(help Help) func(_ *goal.Context, args []goal.V) goal.V
- func VFHTTPClientFn() func(goalContext *goal.Context, args []goal.V) goal.V
- func VFHTTPMaker(ariContext *Context, method string) func(goalContext *goal.Context, args []goal.V) goal.V
- func VFServe(goalContext *goal.Context, args []goal.V) goal.V
- func VFSqlClose(_ *goal.Context, args []goal.V) goal.V
- func VFSqlExecFn(sqlDatabase *SQLDatabase) func(goalContext *goal.Context, args []goal.V) goal.V
- func VFSqlOpen(_ *goal.Context, args []goal.V) goal.V
- func VFSqlQFn(sqlDatabase *SQLDatabase) func(goalContext *goal.Context, args []goal.V) goal.V
- func VFTimeAdd(_ *goal.Context, args []goal.V) goal.V
- func VFTimeDate(_ *goal.Context, args []goal.V) goal.V
- func VFTimeDay(_ *goal.Context, args []goal.V) goal.V
- func VFTimeFixedZone(_ *goal.Context, args []goal.V) goal.V
- func VFTimeFormat(_ *goal.Context, args []goal.V) goal.V
- func VFTimeHour(_ *goal.Context, args []goal.V) goal.V
- func VFTimeLoadLocation(_ *goal.Context, args []goal.V) goal.V
- func VFTimeLocation(_ *goal.Context, args []goal.V) goal.V
- func VFTimeLocationString(_ *goal.Context, args []goal.V) goal.V
- func VFTimeMicrosecond(_ *goal.Context, args []goal.V) goal.V
- func VFTimeMillisecond(_ *goal.Context, args []goal.V) goal.V
- func VFTimeMinute(_ *goal.Context, args []goal.V) goal.V
- func VFTimeMonth(_ *goal.Context, args []goal.V) goal.V
- func VFTimeNanosecond(_ *goal.Context, args []goal.V) goal.V
- func VFTimeNow(_ *goal.Context, _ []goal.V) goal.V
- func VFTimeParse(_ *goal.Context, args []goal.V) goal.V
- func VFTimeSecond(_ *goal.Context, args []goal.V) goal.V
- func VFTimeSub(_ *goal.Context, args []goal.V) goal.V
- func VFTimeUTC(_ *goal.Context, args []goal.V) goal.V
- func VFTimeUnix(_ *goal.Context, args []goal.V) goal.V
- func VFTimeUnixMicro(_ *goal.Context, args []goal.V) goal.V
- func VFTimeUnixMilli(_ *goal.Context, args []goal.V) goal.V
- func VFTimeUnixNano(_ *goal.Context, args []goal.V) goal.V
- func VFTimeWeekDay(_ *goal.Context, args []goal.V) goal.V
- func VFTimeYear(_ *goal.Context, args []goal.V) goal.V
- func VFTimeYearDay(_ *goal.Context, args []goal.V) goal.V
- func VFTimeZoneName(_ *goal.Context, args []goal.V) goal.V
- func VFTimeZoneOffset(_ *goal.Context, args []goal.V) goal.V
- func VFUrlEncode(_ *goal.Context, args []goal.V) goal.V
- type Context
- type HTTPClient
- type Help
- type Location
- type SQLDatabase
- func (sqlDatabase *SQLDatabase) Append(_ *goal.Context, dst []byte, _ bool) []byte
- func (sqlDatabase *SQLDatabase) Close() error
- func (sqlDatabase *SQLDatabase) LessT(y goal.BV) bool
- func (sqlDatabase *SQLDatabase) Matches(y goal.BV) bool
- func (sqlDatabase *SQLDatabase) Open() error
- func (sqlDatabase *SQLDatabase) Type() string
- type Time
Constants ¶
const AriVersion = "v0.1.4"
Version of Ari. Run rt.get"v" to access this value at runtime.
Variables ¶
This section is empty.
Functions ¶
func GoalKeywordsHelp ¶
func GoalSyntax ¶
func NewGoalContext ¶
func NewGoalContext(ariContext *Context, help Help, sqlDatabase *SQLDatabase) (*goal.Context, error)
Initialize a Goal language context with Ari's extensions.
func SQLKeywords ¶
func SQLKeywords() []string
From https://en.wikipedia.org/wiki/List_of_SQL_reserved_words
func SQLQueryContext ¶
func VFGoalHelp ¶ added in v0.1.2
Implements Goal's help monad + Ari's help dyad.
func VFHTTPMaker ¶
func VFSqlClose ¶
Implements sql.close to close the SQL database.
func VFSqlExecFn ¶
Implements sql.exec for executing SQL statements.
func VFTimeDate ¶ added in v0.1.2
Implements time.date function.
func VFTimeFixedZone ¶ added in v0.1.2
Implements time.fixedzone dyad.
func VFTimeFormat ¶ added in v0.1.2
Implements time.format function.
func VFTimeHour ¶ added in v0.1.2
Implements time.hour function.
func VFTimeLoadLocation ¶ added in v0.1.2
Implements time.loadlocation monad.
func VFTimeLocation ¶ added in v0.1.2
Implements time.location function.
func VFTimeLocationString ¶ added in v0.1.2
Implements time.locationstring function.
func VFTimeMicrosecond ¶ added in v0.1.2
Implements time.microsecond function.
func VFTimeMillisecond ¶ added in v0.1.2
Implements time.millisecond function.
func VFTimeMinute ¶ added in v0.1.2
Implements time.minute function.
func VFTimeMonth ¶ added in v0.1.2
Implements time.month function (January = 1).
func VFTimeNanosecond ¶ added in v0.1.2
Implements time.nanosecond function.
func VFTimeParse ¶
Implements time.parse function.
func VFTimeSecond ¶ added in v0.1.2
Implements time.second function.
func VFTimeUnix ¶ added in v0.1.2
Implements time.unix function.
func VFTimeUnixMicro ¶ added in v0.1.2
Implements time.unixmicro function.
func VFTimeUnixMilli ¶ added in v0.1.2
Implements time.unixmilli function.
func VFTimeUnixNano ¶ added in v0.1.2
Implements time.unixnano function.
func VFTimeWeekDay ¶ added in v0.1.2
Implements time.weekday function, for day of week (Sunday = 0).
func VFTimeYear ¶ added in v0.1.2
Implements time.year function.
func VFTimeYearDay ¶ added in v0.1.2
Implements time.yearday function.
func VFTimeZoneName ¶ added in v0.1.2
Implements time.zonename function.
func VFTimeZoneOffset ¶ added in v0.1.2
Implements time.zoneoffset function.
Types ¶
type Context ¶
type Context struct { // GoalContext is needed to evaluate Goal programs and introspect the Goal execution environment. GoalContext *goal.Context // HTTPClient exposed for testing purposes. HTTPClient *HTTPClient // SQLDatabase keeps track of open database connections as well as the data source name. SQLDatabase *SQLDatabase // Help stores documentation information for identifiers. // The top-level keys must match a modes Name output; // the inner maps are a mapping from mode-specific identifiers // to a string that describes them and which is user-facing. Help Help }
func NewContext ¶
Initialize a new Context without connecting to the database.
type HTTPClient ¶
type HTTPClient struct {
Client *resty.Client
}
func NewHTTPClient ¶
func NewHTTPClient(optionsD *goal.D) (*HTTPClient, error)
func (*HTTPClient) LessT ¶
func (httpClient *HTTPClient) LessT(y goal.BV) bool
LessT implements goal.BV.
type Location ¶ added in v0.1.2
type SQLDatabase ¶
func NewSQLDatabase ¶
func NewSQLDatabase(dataSourceName string) (*SQLDatabase, error)
Initialize SQL struct, but don't open the DB yet.
Call SQLDatabase.open to open the database.
func (*SQLDatabase) Close ¶
func (sqlDatabase *SQLDatabase) Close() error
Close will close the underlying sql.DB, if one exists.
func (*SQLDatabase) LessT ¶
func (sqlDatabase *SQLDatabase) LessT(y goal.BV) bool
LessT implements goal.BV.
func (*SQLDatabase) Matches ¶
func (sqlDatabase *SQLDatabase) Matches(y goal.BV) bool
Matches implements goal.BV.
func (*SQLDatabase) Open ¶
func (sqlDatabase *SQLDatabase) Open() error