Documentation ¶
Index ¶
- func SanitizeHeader(header string) string
- type ByDate
- type Directory
- type Document
- type Drive
- func (gog *Drive) BuildFileHierarchy(dirId string, buildPreview bool, includeFilter func(fileType string) bool) *Directory
- func (gog *Drive) BuildFormHierarchy(dirId string) *Directory
- func (gog *Drive) GetArbitraryFile(id string) (io.ReadCloser, error)
- func (gog *Drive) GetFileAsInterface(id string, inter interface{}) error
- func (gog *Drive) GetFileHtml(id string) string
- func (gog *Drive) GetFilePreview(id string) string
- func (gog *Drive) GetFileThumbnailUrl(id string) string
- func (gog *Drive) GetFirstFileMatching(dirId string, name string) (io.ReadCloser, error)
- func (gog *Drive) GetMostRecentFileInDir(dirId string) (io.ReadCloser, error)
- func (gog *Drive) PostArbitraryFile(fileName string, parent string, file io.Reader, mime string) (string, error)
- type Event
- type File
- type Form
- type FormDriveInfo
- type FormMetaData
- type Item
- type ItemFunc
- type SheetData
- func (sheet *SheetData) CountEntries(index int) int
- func (sheet *SheetData) FilterSheet(header string, value string) *SheetData
- func (sheet *SheetData) GetColumn(col int) []interface{}
- func (sheet *SheetData) GetEmptyDataRow() *SheetDataRow
- func (sheet *SheetData) GetRow(row int) *SheetDataRow
- func (sheet *SheetData) NumberRows() int
- func (sheet *SheetData) PrintToScreen()
- type SheetDataRow
- type Sheets
- func (sheetsCon *Sheets) AppendToSheet(sheetId string, sheetName string, data interface{}) error
- func (sheetsCon *Sheets) AppendToSheetIdAndName(sheetIdAndName string, data interface{}) error
- func (sheetsCon *Sheets) GetEmptyDataRow(sheetId string, sheetName string) (*SheetDataRow, error)
- func (sheetsCon *Sheets) GetSheetData(sheetId string, sheetName string) (*SheetData, error)
- func (sheetsCon *Sheets) SyncHeaders(sheetId string, sheetName string, headers []string) error
- func (sheetsCon *Sheets) UploadRow(sheetId string, sheetName string, row *SheetDataRow) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SanitizeHeader ¶
* Provide a simple function to remove white space and to lower case before comparing
Types ¶
type ByDate ¶
type ByDate []Item
ByAge implements sort.Interface for []Person based on the Age field.
type Directory ¶
type Directory struct { File //Keep the type for directory anyways Type string `json:"type"` //Hold a list of items Items []Item `json:"items"` //Keep the parent id, unless this is root and then it is null ParentId string `json:"parentid"` }
Hold the struct need to create a tree
func (*Directory) MarchDownTree ¶
Hold the struct need to create a tree
func (Directory) MarshalJSON ¶
* Custom marashaler
func (*Directory) UnmarshalJSON ¶
type Document ¶
type Document struct { File Type string `json:"type"` //Keep the Preview Preview string `json:"preview"` //Thumbnail Image ThumbnailUrl string `json:"thumbnail"` //Also Keep the parent id ParentId string `json:"parentid"` }
Hold the structs need to create a tree
func (Document) MarshalJSON ¶
type Drive ¶
type Drive struct {
// contains filtered or unexported fields
}
func (*Drive) BuildFileHierarchy ¶
func (gog *Drive) BuildFileHierarchy(dirId string, buildPreview bool, includeFilter func(fileType string) bool) *Directory
* Recursive call to build the file list
func (*Drive) BuildFormHierarchy ¶
* Builds all of the forms and downloads them at the same time
func (*Drive) GetArbitraryFile ¶
func (gog *Drive) GetArbitraryFile(id string) (io.ReadCloser, error)
* * Method to get the file html
func (*Drive) GetFileAsInterface ¶
* * Method to get the file html
func (*Drive) GetFileHtml ¶
* * Method to get the file html
func (*Drive) GetFilePreview ¶
* * Method to get the information hierarchy
func (*Drive) GetFileThumbnailUrl ¶
* * Method to get the information hierarchy
func (*Drive) GetMostRecentFileInDir ¶
func (gog *Drive) GetMostRecentFileInDir(dirId string) (io.ReadCloser, error)
* * Method to get the file html
type Event ¶
type Event struct { File //Keep a boolean if it is a file InfoId string `json:"infoId"` //Keep a boolean if it is a file SignupId string `json:"signupId"` //Keep the parent id, unless this is root and then it is null ParentId string `json:"parentid"` }
Hold the struct need to create a tree
func (Event) MarshalJSON ¶
type File ¶
type File struct { //Keep a boolean if it is a file Id string `json:"id"` //Hold the item Name string `json:"name"` //Hold if we should hide the item HideListing bool `json:"hideListing"` //Keep a date if useful Date *time.Time `json:"date"` }
Hold a base type document
type Form ¶
type Form struct { File //Keep the type for directory anyways Type string `json:"type"` //Keep the parent id, unless this is root and then it is null ParentId string `json:"parentid"` //Hold the item Metadata FormMetaData `json:"metadata"` //Hold a list of items JSONSchema map[string]interface{} `json:"JSONSchema"` //Keep the parent id, unless this is root and then it is null UISchema map[string]interface{} `json:"UISchema"` }
Hold the struct need to create a tree
func (Form) MarshalJSON ¶
type FormDriveInfo ¶
Store the forms metadata
type FormMetaData ¶
type FormMetaData struct { Title string `json:"title"` EmailTo []string `json:"emailTo"` EmailTemplate string `json:"emailTemplate"` EmailSubjectField string `json:"emailSubjectField"` DriveInfo []FormDriveInfo `json:"driveInfo"` RequiredPerm []string `json:"requiredPerm"` }
Store the forms metadata
type SheetData ¶
type SheetData struct { //Store the values in the row Values [][]interface{} //[row][col] //Store the Headers Headers []string //Store a list of original row numbers RowNumb []int // contains filtered or unexported fields }
* Used to store a row of data
func NewSheetData ¶
Create a new sheet data
func (*SheetData) CountEntries ¶
* Count the number of entries for this column
func (*SheetData) FilterSheet ¶
Create a new sheet data
func (*SheetData) GetEmptyDataRow ¶
func (sheet *SheetData) GetEmptyDataRow() *SheetDataRow
Create a new sheet data
func (*SheetData) GetRow ¶
func (sheet *SheetData) GetRow(row int) *SheetDataRow
Create a new sheet data
type SheetDataRow ¶
type SheetDataRow struct { //Store the values in the row Values []interface{} //Store the Headers Headers []string //Store the row number, -1 if new RowNumber int // contains filtered or unexported fields }
* Used to store a row of data
func (*SheetDataRow) EraseData ¶
func (row *SheetDataRow) EraseData()
* Store the empty data in the row
func (*SheetDataRow) GetValue ¶
func (row *SheetDataRow) GetValue(s string) interface{}
*
- Looks up the value
func (*SheetDataRow) GetValueAsString ¶
func (row *SheetDataRow) GetValueAsString(s string) string
*
- Looks up the value
func (*SheetDataRow) SetValue ¶
func (row *SheetDataRow) SetValue(s string, v string)
*
- Looks up the value and sets it
func (*SheetDataRow) StoreDataInRow ¶
func (row *SheetDataRow) StoreDataInRow(data interface{}) error
* Store the empty data in the row
type Sheets ¶
type Sheets struct {
//Store the connection to google. This has been wrapped with the correct Headers
Connection *sheets.Service
}
func (*Sheets) AppendToSheet ¶
* Simple method to append all of the data to the sheet
func (*Sheets) AppendToSheetIdAndName ¶
* Append to the sheet with the name and id split with a /
func (*Sheets) GetEmptyDataRow ¶
func (sheetsCon *Sheets) GetEmptyDataRow(sheetId string, sheetName string) (*SheetDataRow, error)
Get an empty data row
func (*Sheets) GetSheetData ¶
Get an empty data row
func (*Sheets) SyncHeaders ¶
* Simple method to sync the headers