Documentation ¶
Index ¶
- func DbFormatColDelimSettings(coldelim ...string) (readsettings map[string]string)
- func FindMimeTypeByExt(ext string, defaultExt string) (mimetype string, extfound string)
- func MapActiveCommand(path string, a ...interface{})
- func OutputResultSet(w io.Writer, name string, contentext string, res *DbResultSet, err error, ...)
- func ReaderToWriter(r io.Reader, w io.Writer, bufSize int)
- func RegisterDbReadFormat(formatname string, settings map[string]string, ...)
- func RegisterEmbededResources(resources ...interface{})
- func RegisterRoute(path string, rootpath string, ...)
- type ActiveAltOut
- func (atvAltOut *ActiveAltOut) Close()
- func (atvAltOut *ActiveAltOut) IORW() *IORW
- func (atvAltOut *ActiveAltOut) Print(a ...interface{})
- func (atvAltOut *ActiveAltOut) Println(a ...interface{})
- func (altOut *ActiveAltOut) Read(p []byte) (n int, err error)
- func (altOut *ActiveAltOut) Seek(offset int64, whence int) (n int64, err error)
- func (altOut *ActiveAltOut) Write(p []byte) (n int, err error)
- type ActiveCommandHandler
- type ActiveDBConn
- type ActiveDBConnector
- type ActiveDBDriver
- type ActiveProcessor
- func (atvpros *ActiveProcessor) AlternateOut(name string, create ...bool) (atvaltout *ActiveAltOut)
- func (atvpros *ActiveProcessor) Out() *widgeting.OutPrint
- func (atvpros *ActiveProcessor) Parameters() *Parameters
- func (atvpros *ActiveProcessor) Process(rs io.ReadSeeker, root string, path string, retrieveRS RetrieveRSFunc, ...) (err error)
- func (atvpros *ActiveProcessor) RemoveAlternateOut(name string)
- type Client
- type ColumnType
- func (colType *ColumnType) DatabaseType() string
- func (colType *ColumnType) HasLength() bool
- func (colType *ColumnType) HasNullable() bool
- func (colType *ColumnType) HasPrecisionScale() bool
- func (colType *ColumnType) Length() int64
- func (colType *ColumnType) Name() string
- func (colType *ColumnType) Nullable() bool
- func (colType *ColumnType) Numeric() bool
- func (colType *ColumnType) Precision() int64
- func (colType *ColumnType) Scale() int64
- func (colType *ColumnType) Type() reflect.Type
- type DBExecuted
- type DBQuery
- func (dbqry *DBQuery) Data() []interface{}
- func (dbqry *DBQuery) MetaData() *DbResultSetMetaData
- func (dbqry *DBQuery) Next() bool
- func (dbqry *DBQuery) PrintResult(out *IORW, name string, contentext string, setting ...string)
- func (dbqry *DBQuery) Process() (err error)
- func (dbqry *DBQuery) ReadAll(w io.Writer, format string)
- func (dbqry *DBQuery) ReadAllCustom(w io.Writer, settings map[string]string, ...)
- type DbConnection
- func (cn *DbConnection) Execute(query string, args ...interface{}) (lastInsertID int64, rowsAffected int64, err error)
- func (cn *DbConnection) ParseQuery(query string) (parsedquery string, params []string)
- func (cn *DbConnection) Query(query string, args ...interface{}) (rset *DbResultSet, err error)
- type DbManager
- func (dbmngr *DbManager) Connection(alias string) (cn *DbConnection)
- func (dbmngr *DbManager) Execute(alias string, query string, args ...interface{}) (dbexecuted *DBExecuted)
- func (dbmngr *DbManager) Open(alias string, driver string, datasourcename string) (cn *DbConnection, err error)
- func (dbmngr *DbManager) Query(alias string, query string, args ...interface{}) (dbquery *DBQuery)
- func (dbmngr *DbManager) RegisterConnection(alias string, driver string, datasourcename string) (err error)
- type DbResultSet
- type DbResultSetMetaData
- type DbStatement
- func (stmnt *DbStatement) Begin() (err error)
- func (stmnt *DbStatement) Close() (err error)
- func (stmnt *DbStatement) Execute(query string, args ...interface{}) (lastInsertID int64, rowsAffected int64, err error)
- func (stmnt *DbStatement) Query(query string, args ...interface{}) (rset *DbResultSet, err error)
- type EmbededResource
- type Exception
- type Header
- func (hdr Header) Append(name string, value ...string)
- func (hdr Header) ContainsKey(key string) (keyok bool)
- func (hdr Header) Keys() (keys []string)
- func (hdr Header) SetValue(name string, value ...string)
- func (hdr Header) Value(name string) []string
- func (hdr Header) Values(name ...string) (values [][]string)
- type IORW
- func (ioRW *IORW) BufferSize() (bufsize int64)
- func (ioRW *IORW) ClearBuffer()
- func (ioRW *IORW) Close() (err error)
- func (ioRW *IORW) Empty() bool
- func (ioRW *IORW) FileInfo() os.FileInfo
- func (ioRW *IORW) HasPrefix(prefix []byte) bool
- func (ioRW *IORW) HasPrefixExp(regexp *regexp.Regexp) bool
- func (ioRW *IORW) HasPrefixSuffix(prefix []byte, suffix []byte) bool
- func (ioRW *IORW) HasSuffix(suffix []byte) bool
- func (ioRW *IORW) MatchExp(regexpa ...interface{}) bool
- func (ioRW *IORW) NonBufferSize() (nonsize int64)
- func (ioRW *IORW) Print(a ...interface{}) (n int, err error)
- func (ioRW *IORW) Println(a ...interface{}) (n int, err error)
- func (ioRW *IORW) Read(p []byte) (n int, err error)
- func (ioRW *IORW) ReadAll(w io.Writer) (err error)
- func (ioRW *IORW) ReadAllToHandle(hndle func([]byte) (int, error)) (err error)
- func (ioRW *IORW) ReadRune() (r rune, size int, err error)
- func (ioRW *IORW) ReadWriteCursor(enableLocking bool) (ioRWCur *ReadWriteCursor)
- func (ioRW *IORW) Seek(offset int64, whence int) (n int64, err error)
- func (ioRW *IORW) SeekIndex() int64
- func (ioRW *IORW) Size() (size int64)
- func (ioRW *IORW) String() (s string)
- func (ioRW *IORW) UnderlyingCursor() *ReadWriteCursor
- func (ioRW *IORW) Write(p []byte) (n int, err error)
- func (ioRW *IORW) WriteAll(r io.Reader, maxReadLen ...int64) (err error)
- func (ioRW *IORW) WriteRune(r rune) (int, error)
- type IOSeekReader
- func (iosr *IOSeekReader) ClearIOSeekReader()
- func (iosr *IOSeekReader) Empty() bool
- func (iosr *IOSeekReader) Read(p []byte) (n int, err error)
- func (iosr *IOSeekReader) Size() int
- func (iosr *IOSeekReader) StringSeekPos(pos int, bufsize int) (s string, err error)
- func (iosr *IOSeekReader) WriteSeekedPos(w io.Writer, pos int, bufsize int) (err error)
- type IOSeekReaderInput
- type IOSeekReaderOutput
- type Parameters
- func (params *Parameters) CleanupParameters()
- func (params *Parameters) ContainsFileParameter(pname string) bool
- func (params *Parameters) ContainsParameter(pname string) bool
- func (params *Parameters) FileKeys() (keys []string)
- func (params *Parameters) FileParameter(pname string) []interface{}
- func (params *Parameters) Parameter(pname string) []string
- func (params *Parameters) SetFileParameter(pname string, clear bool, pfile ...interface{})
- func (params *Parameters) SetParameter(pname string, clear bool, pvalue ...string)
- func (params *Parameters) StandardKeys() (keys []string)
- func (params *Parameters) StringParameter(pname string, sep string) string
- type ProcessingFunc
- type QueryStage
- type ReadColumnsFunc
- type ReadRowFunc
- type ReadWriteCursor
- func (ioRWCur *ReadWriteCursor) Close() (err error)
- func (ioRWCur *ReadWriteCursor) FileInfo() os.FileInfo
- func (ioRWCur *ReadWriteCursor) Read(p []byte) (n int, err error)
- func (ioRWCur *ReadWriteCursor) ReadAll(w io.Writer) (err error)
- func (ioRWCur *ReadWriteCursor) ReadAllToHandle(hndle func([]byte) (int, error)) (err error)
- func (ioRWCur *ReadWriteCursor) ReadRune() (r rune, size int, err error)
- func (ioRWCur *ReadWriteCursor) Seek(offset int64, whence int) (n int64, err error)
- func (ioRWCur *ReadWriteCursor) SeekIndex() int64
- func (ioRWCur *ReadWriteCursor) String() (s string)
- type RequestContent
- type RequestHeader
- type ResponseContent
- type ResponseHeader
- type RetrieveRSFunc
- type Route
- type Router
- type SeekOutput
- type Seeker
- type Server
- type Service
- func (svr *Service) Execute(args []string) (err error)
- func (svr *Service) IsConsole() bool
- func (svr *Service) IsService() bool
- func (svr *Service) ServiceDescription() string
- func (svr *Service) ServiceDisplayName() string
- func (svr *Service) ServiceExeFolder() string
- func (svr *Service) ServiceExeName() string
- func (svr *Service) ServiceName() string
- func (svr *Service) Start(s service.Service) error
- func (svr *Service) Stop(s service.Service) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindMimeTypeByExt ¶
FindMimeTypeByExt method that accepts ext [extension] and defaultext [default extension] and returns the appropriate mime type
func MapActiveCommand ¶
func MapActiveCommand(path string, a ...interface{})
MapActiveCommand map a resource path to a list if ActiveCommandHandler(s) by command name e.g. lnksworks.MapActiveCommand("test/test.html",
"testcommand", func(atvpros *lnksworks.ActiveProcessor, path string, a ...string) (err error) { atvpros.Out().Elem("span", func(out *widgeting.OutPrint, a ...interface{}) { out.Print("content in span") }) return err }, )
func OutputResultSet ¶
func OutputResultSet(w io.Writer, name string, contentext string, res *DbResultSet, err error, setting ...string)
OutputResultSet - helper method that output res *DbResultSet to the following formats into a io.Writer contentext=.js => javascript contentext=.json => json contentext=.csv => .csv
func ReaderToWriter ¶
ReaderToWriter conveniance method to write content from r io.Reader to w io.Writer using the indicated bufSize
func RegisterDbReadFormat ¶
func RegisterEmbededResources ¶
func RegisterEmbededResources(resources ...interface{})
RegisterEmbededResources RegisterEmbededResources Usage RegisterEmbededResources(string,io.Reader,string,io.Reader)
func RegisterRoute ¶
func RegisterRoute(path string, rootpath string, hndlefunc ...func(svr *Server, rt *Route, root string, path string, mimetype string, w http.ResponseWriter, r *http.Request, active *ActiveProcessor))
RegisterRoute register logical pathed route path - logic path rootpath - physical path to e.g drive location hndlefunc overloaded func(svr *Server, rt *Route, root string, path string, mimetype string, w http.ResponseWriter, r *http.Request, active *ActiveProcessor)
Types ¶
type ActiveAltOut ¶
type ActiveAltOut struct {
// contains filtered or unexported fields
}
func (*ActiveAltOut) Close ¶
func (atvAltOut *ActiveAltOut) Close()
func (*ActiveAltOut) IORW ¶
func (atvAltOut *ActiveAltOut) IORW() *IORW
func (*ActiveAltOut) Print ¶
func (atvAltOut *ActiveAltOut) Print(a ...interface{})
func (*ActiveAltOut) Println ¶
func (atvAltOut *ActiveAltOut) Println(a ...interface{})
type ActiveCommandHandler ¶
type ActiveCommandHandler = func(atvpros *ActiveProcessor, path string, a ...string) error
ActiveCommandHandler definition of func that impliments the function that needs to be applied by the command mapped in MapActiveCommand
type ActiveDBConn ¶
type ActiveDBConn struct {
// contains filtered or unexported fields
}
func (*ActiveDBConn) Close ¶
func (atvdbcn *ActiveDBConn) Close() (err error)
type ActiveDBConnector ¶
type ActiveDBConnector struct {
// contains filtered or unexported fields
}
func (*ActiveDBConnector) Driver ¶
func (atvdbcntr *ActiveDBConnector) Driver() driver.Driver
type ActiveDBDriver ¶
type ActiveDBDriver struct {
// contains filtered or unexported fields
}
func (*ActiveDBDriver) Open ¶
func (atvdbdrvr *ActiveDBDriver) Open(name string) (cn driver.Conn, err error)
func (*ActiveDBDriver) OpenConnector ¶
func (atvdbdrvr *ActiveDBDriver) OpenConnector(name string) (cntr driver.Connector, err error)
type ActiveProcessor ¶
type ActiveProcessor struct {
// contains filtered or unexported fields
}
ActiveProcessor - ActiveProcessor
func NewActiveProcessor ¶
func NewActiveProcessor(w io.Writer) *ActiveProcessor
NewActiveProcessor new ActiveProcessor
func (*ActiveProcessor) AlternateOut ¶
func (atvpros *ActiveProcessor) AlternateOut(name string, create ...bool) (atvaltout *ActiveAltOut)
func (*ActiveProcessor) Out ¶
func (atvpros *ActiveProcessor) Out() *widgeting.OutPrint
Out current acive process out put handle
func (*ActiveProcessor) Parameters ¶
func (atvpros *ActiveProcessor) Parameters() *Parameters
Parameters current active process Parameters container
func (*ActiveProcessor) Process ¶
func (atvpros *ActiveProcessor) Process(rs io.ReadSeeker, root string, path string, retrieveRS RetrieveRSFunc, altlbls ...string) (err error)
Process main method that apply the active process rs - io.ReadSeeker of active content root - root path of rs path - path that active content can be found retrieveRS - func reference to a implementation base on RetrieveRSFunc definition
func (*ActiveProcessor) RemoveAlternateOut ¶
func (atvpros *ActiveProcessor) RemoveAlternateOut(name string)
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client conveniance struct wrapping arround *http.Client, io.Writer -> io.Reader ...
func (*Client) CleanupClient ¶
func (clnt *Client) CleanupClient()
CleanupClient cleanup Client instance
type ColumnType ¶
type ColumnType struct {
// contains filtered or unexported fields
}
ColumnType structure defining column definition
func (*ColumnType) DatabaseType ¶
func (colType *ColumnType) DatabaseType() string
DatabaseType ColumnType underlying db type as defined by cnstring of DbConnection
func (*ColumnType) HasLength ¶
func (colType *ColumnType) HasLength() bool
HasLength ColumnType content has Length definition
func (*ColumnType) HasNullable ¶
func (colType *ColumnType) HasNullable() bool
HasNullable ColumnType content has NULL able content
func (*ColumnType) HasPrecisionScale ¶
func (colType *ColumnType) HasPrecisionScale() bool
HasPrecisionScale ColumnType content has PrecisionScale
func (*ColumnType) Length ¶
func (colType *ColumnType) Length() int64
Length ColumnType content lenth must be used in conjunction with HasLength
func (*ColumnType) Nullable ¶
func (colType *ColumnType) Nullable() bool
Nullable ColumnType content is Nullable
func (*ColumnType) Numeric ¶
func (colType *ColumnType) Numeric() bool
Numeric ColumnType is Numeric() bool
func (*ColumnType) Precision ¶
func (colType *ColumnType) Precision() int64
Precision ColumnType numeric Precision. Used in conjunction with HasPrecisionScale
func (*ColumnType) Scale ¶
func (colType *ColumnType) Scale() int64
Scale ColumnType Scale. Used in conjunction with HasPrecisionScale
func (*ColumnType) Type ¶
func (colType *ColumnType) Type() reflect.Type
Type ColumnType reflect.Type as specified by golang sql/database
type DBExecuted ¶
DBExecuted controller
type DBQuery ¶
type DBQuery struct { RSet *DbResultSet Err error // contains filtered or unexported fields }
DBQuery DBQuery controller
func (*DBQuery) Data ¶
func (dbqry *DBQuery) Data() []interface{}
Data returns an array if data of the current row from the underlying resultset
func (*DBQuery) MetaData ¶
func (dbqry *DBQuery) MetaData() *DbResultSetMetaData
MetaData return a DbResultSetMetaData object of the resultset that is wrapped by this DBQuery controller
func (*DBQuery) PrintResult ¶
PrintResult [refer to OutputResultSet] - helper method that output res *DbResultSet to the following formats into a io.Writer contentext=.js => javascript contentext=.json => json contentext=.csv => .csv
type DbConnection ¶
type DbConnection struct {
// contains filtered or unexported fields
}
DbConnection DbConnection controller
func (*DbConnection) Execute ¶
func (cn *DbConnection) Execute(query string, args ...interface{}) (lastInsertID int64, rowsAffected int64, err error)
Execute - Execute (query) refer to golang sql connection Execute method
func (*DbConnection) ParseQuery ¶
func (cn *DbConnection) ParseQuery(query string) (parsedquery string, params []string)
ParseQuery parse query and return parsed query based on db connection type and list of paramnames query e.g 'SELECT :TEST-PARAM AS param' where :TEST-PARAM is name of parameter
func (*DbConnection) Query ¶
func (cn *DbConnection) Query(query string, args ...interface{}) (rset *DbResultSet, err error)
Query - Query (query) refer to golang sql connection Query method except that it returns and DbResultSet that extends standard resultset functionality
type DbManager ¶
type DbManager struct {
// contains filtered or unexported fields
}
DbManager DbManager controller
func DatabaseManager ¶
func DatabaseManager() *DbManager
DatabaseManager global instance of DbManager
func (*DbManager) Connection ¶
func (dbmngr *DbManager) Connection(alias string) (cn *DbConnection)
Connection returns aliased DbConnection
func (*DbManager) Execute ¶
func (dbmngr *DbManager) Execute(alias string, query string, args ...interface{}) (dbexecuted *DBExecuted)
Execute execute query for alias connection return a DbExecute controller that represents the outcome of the executed request
func (*DbManager) Open ¶
func (dbmngr *DbManager) Open(alias string, driver string, datasourcename string) (cn *DbConnection, err error)
Open - open a db connection based and register aliased reference to it in the DbManager returns a DbConnnection controller of the connection
type DbResultSet ¶
type DbResultSet struct {
// contains filtered or unexported fields
}
DbResultSet DbResultSet container
func (*DbResultSet) Close ¶
func (rset *DbResultSet) Close() (err error)
Close the DbResultSet as well as the underlying DbStatement related to this DbResultSet After this action the DbResultSet is 'empty' or cleaned up in a golang world
func (*DbResultSet) Data ¶
func (rset *DbResultSet) Data() []interface{}
Data return Displayable data in the form of a slice, 'array', of interface{} values
func (*DbResultSet) MetaData ¶
func (rset *DbResultSet) MetaData() *DbResultSetMetaData
MetaData DbResultSet=>DbResultSetMetaData
func (*DbResultSet) Next ¶
func (rset *DbResultSet) Next() (next bool, err error)
Next return true if able to move focus of DbResultSet to the next underlying record or false if the end is reached
type DbResultSetMetaData ¶
type DbResultSetMetaData struct {
// contains filtered or unexported fields
}
DbResultSetMetaData DbResultSet meta data container
func (*DbResultSetMetaData) ColumnTypes ¶
func (rsetmeta *DbResultSetMetaData) ColumnTypes() []*ColumnType
ColumnTypes ColumnType(s) definition(s)
func (*DbResultSetMetaData) Columns ¶
func (rsetmeta *DbResultSetMetaData) Columns() []string
Columns column name(s)
type DbStatement ¶
type DbStatement struct {
// contains filtered or unexported fields
}
DbStatement container representing the underlying DbConnection and allocated sql.Tx transaction
func NewDbStatement ¶
func NewDbStatement(cn *DbConnection) (stmnt *DbStatement, err error)
NewDbStatement invoke a new DbStatement from the DbConnection
func (*DbStatement) Begin ¶
func (stmnt *DbStatement) Begin() (err error)
Begin Invoke a transaction, sql.Tx, from the for ths DbStatement
func (*DbStatement) Close ¶
func (stmnt *DbStatement) Close() (err error)
Close the allocated transaction, sql.Tx associated to this DbStatement It will by default perform a commit before releasing the transaction reference
func (*DbStatement) Execute ¶
func (stmnt *DbStatement) Execute(query string, args ...interface{}) (lastInsertID int64, rowsAffected int64, err error)
Execute execute a none DbResultSet query Usually used for statement like update and insert, or executing db procedures that dont return a record In the case of Insert or Update if the underlying db driver return the lastInsertID and rowsAffected if supported
func (*DbStatement) Query ¶
func (stmnt *DbStatement) Query(query string, args ...interface{}) (rset *DbResultSet, err error)
Query and return a DbResultSet
type EmbededResource ¶
type EmbededResource struct {
// contains filtered or unexported fields
}
EmbededResource struct representing embeded resource
type Header ¶
Header core Header map
func (Header) ContainsKey ¶
ContainsKey check if Header ContainsKey
type IORW ¶
type IORW struct { //altCloser io.Closer //altReaderLock *sync.Mutex //altReadSeeker io.ReadSeeker //altWriter io.Writer //altWriterLock *sync.Mutex //altWriteSeeker io.WriteSeeker io.Reader io.Writer io.ReadSeeker io.WriteSeeker // contains filtered or unexported fields }
IORW Reader Writer
func EmbededResourceByPath ¶
EmbededResourceByPath return EmbededResource by path note return resio *IORW
func (*IORW) BufferSize ¶
BufferSize only buffer size of IORW Content
func (*IORW) ClearBuffer ¶
func (ioRW *IORW) ClearBuffer()
ClearBuffer clear internal memory buffer of IORW and cleanup internal ReadWriteCursor
func (*IORW) FileInfo ¶
FileInfo return the os.FileInfo of the underlying file that the IO wraps arround
func (*IORW) HasPrefix ¶
HasPrefix indicate if the IORW internal content starts with the indicated []byte prefix
func (*IORW) HasPrefixExp ¶
HasPrefixExp indicate of the IORW underlying content start with the specified regexp
func (*IORW) HasPrefixSuffix ¶
HasPrefixSuffix indicate if the IORW internal content starts with the indicated []byte prefix and ends with the indicated []byte suffix
func (*IORW) HasSuffix ¶
HasSuffix indicate if the IORW internal content emd with the indicated []byte suffix
func (*IORW) MatchExp ¶
MatchExp Indicate if the content match the one or more regexp(s) If mor than one regexp, *regexp.Regexp, is passed it will test the regexp(s) in order
func (*IORW) NonBufferSize ¶
NonBufferSize Size of IORW Content excluding the buffer
func (*IORW) Print ¶
Print -. conveniant method that works the same as fmt.Fprint but writing to IORW
func (*IORW) Println ¶
Println -. conveniant method that works the same as fmt.Fprintln but writing to IORW
func (*IORW) ReadAllToHandle ¶
ReadAllToHandle perform same action as ReadAll just calling a custom handle as an output (write) caller
func (*IORW) ReadWriteCursor ¶
func (ioRW *IORW) ReadWriteCursor(enableLocking bool) (ioRWCur *ReadWriteCursor)
ReadWriteCursor create a cursor instance to handle Read operations in multi session environments
func (*IORW) UnderlyingCursor ¶
func (ioRW *IORW) UnderlyingCursor() *ReadWriteCursor
UnderlyingCursor internal, underlying, ReadWriteCursor of IORW for internal IO operations
type IOSeekReader ¶
type IOSeekReader struct { *Seeker // contains filtered or unexported fields }
IOSeekReader extends Seeker and wraps arround a io.ReaderSeeker
func NewIOSeekReader ¶
func NewIOSeekReader(ioRS io.ReadSeeker) *IOSeekReader
NewIOSeekReader invoke instance of *IOSeekReader that wrap arround an ioRS io.ReadSeeker
func (*IOSeekReader) ClearIOSeekReader ¶
func (iosr *IOSeekReader) ClearIOSeekReader()
ClearIOSeekReader clear IOSeekReader
func (*IOSeekReader) Empty ¶
func (iosr *IOSeekReader) Empty() bool
Empty indicate if any seek pos start end posistion list is empty
func (*IOSeekReader) Size ¶
func (iosr *IOSeekReader) Size() int
Size size or length of the seek pos sart end posistion list
func (*IOSeekReader) StringSeekPos ¶
func (iosr *IOSeekReader) StringSeekPos(pos int, bufsize int) (s string, err error)
StringSeekPos return s string value of pos, index, of point[starti,endi]
func (*IOSeekReader) WriteSeekedPos ¶
WriteSeekedPos write content of pos, index, of point[starti,endi] into w io.Writer
type IOSeekReaderInput ¶
type IOSeekReaderInput interface { ReadSeekedIndex(int, int, []byte) int64 ReadSeekedPos(int, []byte) (int, error) }
IOSeekReaderInput IOSeekReader input interface
type IOSeekReaderOutput ¶
IOSeekReaderOutput IOSeekReader output interface
type Parameters ¶
type Parameters struct {
// contains filtered or unexported fields
}
Parameters -> structure containing parameters
func NewParameters ¶
func NewParameters() *Parameters
NewParameters return new instance of Paramaters container
func (*Parameters) CleanupParameters ¶
func (params *Parameters) CleanupParameters()
CleanupParameters function that can be called to assist in cleaning up instance of Parameter container
func (*Parameters) ContainsFileParameter ¶
func (params *Parameters) ContainsFileParameter(pname string) bool
ContainsFileParameter -> check if file parameter exist pname : name
func (*Parameters) ContainsParameter ¶
func (params *Parameters) ContainsParameter(pname string) bool
ContainsParameter -> check if parameter exist pname : name
func (*Parameters) FileKeys ¶
func (params *Parameters) FileKeys() (keys []string)
FileKeys - list of file parameters names (keys)
func (*Parameters) FileParameter ¶
func (params *Parameters) FileParameter(pname string) []interface{}
FileParameter return file paramater - array of file
func (*Parameters) Parameter ¶
func (params *Parameters) Parameter(pname string) []string
Parameter - return a specific parameter values
func (*Parameters) SetFileParameter ¶
func (params *Parameters) SetFileParameter(pname string, clear bool, pfile ...interface{})
SetFileParameter -> set or append file parameter value pname : name pfile : value of interface to add either FileHeader from mime/multipart or any io.Reader implementation clear : clear existing value of parameter
func (*Parameters) SetParameter ¶
func (params *Parameters) SetParameter(pname string, clear bool, pvalue ...string)
SetParameter -> set or append parameter value pname : name pvalue : value of strings to add clear : clear existing value of parameter
func (*Parameters) StandardKeys ¶
func (params *Parameters) StandardKeys() (keys []string)
StandardKeys - list of standard parameters names (keys)
func (*Parameters) StringParameter ¶
func (params *Parameters) StringParameter(pname string, sep string) string
StringParameter return parameter as string concatenated with sep
type ProcessingFunc ¶
type ProcessingFunc = func(dbqry *DBQuery, stage QueryStage, a ...interface{})
ProcessingFunc definition
type QueryStage ¶
type QueryStage int
QueryStage stage
func (QueryStage) String ¶
func (qrystage QueryStage) String() (s string)
type ReadColumnsFunc ¶
type ReadColumnsFunc = func(dbqry *DBQuery, columns []string, columntypes []*ColumnType)
ReadColumnsFunc definition
type ReadRowFunc ¶
ReadRowFunc definition
type ReadWriteCursor ¶
type ReadWriteCursor struct {
// contains filtered or unexported fields
}
ReadWriteCursor cursor for IORW
func (*ReadWriteCursor) Close ¶
func (ioRWCur *ReadWriteCursor) Close() (err error)
Close refer to io.ReaderClose in golang docs
func (*ReadWriteCursor) FileInfo ¶
func (ioRWCur *ReadWriteCursor) FileInfo() os.FileInfo
FileInfo fileinfo
func (*ReadWriteCursor) ReadAll ¶
func (ioRWCur *ReadWriteCursor) ReadAll(w io.Writer) (err error)
ReadAll content from BhReaderWriterCursor into w io.Writer
func (*ReadWriteCursor) ReadAllToHandle ¶
func (ioRWCur *ReadWriteCursor) ReadAllToHandle(hndle func([]byte) (int, error)) (err error)
ReadAllToHandle perform same action as ReaadAll just calling a custom handle as an ouput (write) caller
func (*ReadWriteCursor) ReadRune ¶
func (ioRWCur *ReadWriteCursor) ReadRune() (r rune, size int, err error)
ReadRune implements the io.RuneReader interface.
func (*ReadWriteCursor) Seek ¶
func (ioRWCur *ReadWriteCursor) Seek(offset int64, whence int) (n int64, err error)
Seek -> refer to io.Seeker golang docs offset to seek from whence -> 0 == From Start whence -> 1 == From Current Offset index whence -> 2 == From End
func (*ReadWriteCursor) SeekIndex ¶
func (ioRWCur *ReadWriteCursor) SeekIndex() int64
SeekIndex last seekindex of ReadWriteCursor
type RequestContent ¶
type RequestContent struct {
// contains filtered or unexported fields
}
RequestContent Client RequestContent
type RequestHeader ¶
type RequestHeader struct { *Header // contains filtered or unexported fields }
RequestHeader request Header
func (*RequestHeader) Client ¶
func (reqHdr *RequestHeader) Client() *Client
Client public Client method for RequestHeader
type ResponseContent ¶
type ResponseContent struct {
// contains filtered or unexported fields
}
ResponseContent Client ResponseContent
type ResponseHeader ¶
type ResponseHeader struct { *Header // contains filtered or unexported fields }
ResponseHeader response Header
func (*ResponseHeader) Client ¶
func (respHdr *ResponseHeader) Client() *Client
Client public Client method for ResponseHeader
type RetrieveRSFunc ¶
type RetrieveRSFunc = func(root string, path string) (rsfound io.ReadSeeker, rsfounderr error)
RetrieveRSFunc definition if function that retrieve external active resource e.g file
type Route ¶
type Route struct {
// contains filtered or unexported fields
}
Route struct of Route
func (*Route) ServeContent ¶
func (rt *Route) ServeContent(path string, w http.ResponseWriter, r *http.Request, active *ActiveProcessor, retrievedRs map[string]io.ReadSeeker)
ServeContent that invoke mapped hndlefunc -> func(svr *Server, rt *Route, root string, path string, mimetype string, w http.ResponseWriter, r *http.Request, active *ActiveProcessor)
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
Router struct mapping Route(s)
type Seeker ¶
type Seeker struct {
// contains filtered or unexported fields
}
Seeker base struct implementation of SeekOutput
func (*Seeker) ClearSeeker ¶
func (sker *Seeker) ClearSeeker()
ClearSeeker clear seeker starti,endi points
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server conveniance struct wrapping arround *http.Server
func NewServer ¶
NewServer return *Server istls is tls listener certfile string - path to certificate file keyFile string - path to key file
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service struct
func NewService ¶
func NewService(name string, displayName string, description string, start func(*Service, ...string), run func(*Service, ...string), stop func(*Service, ...string)) (svr *Service, err error)
NewService invoke new *Service name - ServiceName displayName - ServiceDisplayName description - ServiceDescription start - func(*Service, ...string) implementation, gets invoked when Service Start run - func(*Service, ...string) implementation, gets invoked when Service Run stop - func(*Service, ...string) implementation, gets invoked when Service Stop
func (*Service) Execute ¶
Execute main Service Execute method when executing Service called in main() func of golang app, args - args from os gets passed into here
func (*Service) ServiceDescription ¶
ServiceDescription Service Description
func (*Service) ServiceDisplayName ¶
ServiceDisplayName Service Display Name
func (*Service) ServiceExeFolder ¶
ServiceExeFolder local folder where Service Executable resides
func (*Service) ServiceExeName ¶
ServiceExeName Service Executable Name