factset

package
v0.0.0-...-fb06ac0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 11, 2017 License: MIT Imports: 11 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FSFile

type FSFile struct {
	Name    string
	Path    string
	Version PackageVersion
	IsFull  bool
}

FSFile - representation of a file on the Factset server

type Package

type Package struct {
	Dataset     string
	FSPackage   string
	Product     string
	Bundle      string
	FeedVersion int
}

Package - represents a package from Factset

type PackageMetadata

type PackageMetadata struct {
	Package
	SchemaVersion     PackageVersion
	SchemaLoadedDate  time.Time
	PackageVersion    PackageVersion
	PackageLoadedDate time.Time
}

PackageMetadata - extended package including versioning information

type PackageVersion

type PackageVersion struct {
	FeedVersion int
	Sequence    int
}

PackageVersion - Factset package versioning is two parts

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service - Factset service

func (*Service) Download

func (s *Service) Download(file FSFile, product string) (*os.File, error)

Download - downloads the file from Factset and provides a local file object

func (*Service) GetLatestFile

func (s *Service) GetLatestFile(pkg Package, isFull bool) (FSFile, error)

GetLatestFile - Get latest file for a package

func (*Service) GetSchemaInfo

func (s *Service) GetSchemaInfo(pkg Package) (*PackageVersion, error)

GetSchemaInfo - Get the latest schema info from Factset

type Servicer

type Servicer interface {
	GetSchemaInfo(pkg Package) (*PackageVersion, error)
	GetLatestFile(pkg Package, isFull bool) (FSFile, error)
	Download(file FSFile, product string) (*os.File, error)
}

Servicer - service interface to be able to mock for testing

func NewService

func NewService(sftpUser, sftpKey, sftpAddress string, sftpPort int, workspace string) (Servicer, error)

NewService - create a new Service(r)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL