Versions in this module Expand all Collapse all v1 v1.1.0 Aug 30, 2017 Changes in this version + const SchemaVersion + type AWSAccountInfo struct + AWSAccountID string + Name string + ReportID string + type AWSProductInfo struct + Description string + Name string + ProductCode string + type Bucket struct + AWSAccessKeyID string + AWSSecretAccessKey string + Bucketname string + CTime time.Time + ID string + Region string + ReportID string + ReportPath string + type Configuration struct + EULAAccepted bool + ID int + PrivateKey string + PublicCertificate string + SchemaVersion int + SessionAuthKey []byte + SessionCryptKey []byte + type Report struct + Accounts []*AWSAccountInfo + Buckets []*Bucket + CTime time.Time + ID string + MTime time.Time + OwnerUserID string + ReportName string + RetentionDays int + Status claudia.ReportStatus + StatusDetail string + func (r *Report) ETag() string + func (r *Report) GetBucket(bucketname, reportPath string) *Bucket + type SessionInfo struct + UserID string + Username string + type SessionManager struct + Store *sessions.CookieStore + func (s *SessionManager) DeleteSession(w http.ResponseWriter, r *http.Request) + func (s *SessionManager) SetSession(user *User, w http.ResponseWriter, r *http.Request) error + func (s *SessionManager) UpdateSessionKeys(authKey, cryptKey []byte) + func (s *SessionManager) ValidateSession(w http.ResponseWriter, r *http.Request) (*SessionInfo, error) + type Tx struct + func (tx *Tx) AddBucket(reportID string, b *Bucket) (string, error) + func (tx *Tx) AddReportAccount(reportID string, accountID string) error + func (tx *Tx) CreateUser(username, password string) (*User, error) + func (tx *Tx) CreateUserReport(userID string, r *Report) (string, error) + func (tx *Tx) DeleteBucket(bucket Bucket) error + func (tx *Tx) DeleteReportAccount(reportID, accountID string) error + func (tx *Tx) DeleteUserReport(userID string, reportID string) error + func (tx *Tx) GetAWSAccounts(reportID string) ([]*AWSAccountInfo, error) + func (tx *Tx) GetBucket(bucketID string) (*Bucket, error) + func (tx *Tx) GetConfiguration() (*Configuration, error) + func (tx *Tx) GetProduct(productCode string) (*AWSProductInfo, error) + func (tx *Tx) GetProducts() ([]*AWSProductInfo, error) + func (tx *Tx) GetReportBuckets(reportID string) ([]*Bucket, error) + func (tx *Tx) GetReports() ([]*Report, error) + func (tx *Tx) GetUserByID(userID string) (*User, error) + func (tx *Tx) GetUserByUsername(username string) (*User, error) + func (tx *Tx) GetUserDefaultReport(userID string) (*Report, error) + func (tx *Tx) GetUserReport(userID string, reportID string) (*Report, error) + func (tx *Tx) GetUserReports(userID string) ([]*Report, error) + func (tx *Tx) RotateSessionKey() (*Configuration, error) + func (tx *Tx) UpdateBucket(bucket Bucket) error + func (tx *Tx) UpdateConfiguration(configUpdates *Configuration) (*Configuration, bool, error) + func (tx *Tx) UpdateReportAcccount(account *AWSAccountInfo) (*AWSAccountInfo, error) + func (tx *Tx) UpdateUser(u *User) (*User, error) + func (tx *Tx) UpdateUserReport(r *Report) error + func (tx *Tx) UpdateUserReportMtime(reportID string) error + func (tx *Tx) UpdateUserReportStatus(reportID string, status claudia.ReportStatus, statusDetail string) error + func (tx *Tx) UpsertProduct(product *AWSProductInfo) error + type User struct + CTime time.Time + CurrentPassword string + ID string + MTime time.Time + Password string + PasswordHash []byte + Username string + type UserDatabase struct + func Open(datasource string) (*UserDatabase, error) + func (db *UserDatabase) AuthenticateUser(username, password string) (*User, error) + func (db *UserDatabase) Begin() (*Tx, error) + func (db *UserDatabase) Drop() error + func (db *UserDatabase) GetProductAliases() (map[string]*AWSProductInfo, error) + func (db *UserDatabase) Init() error + func (db *UserDatabase) NewSessionManager(authKey, cryptKey []byte) *SessionManager + func (db *UserDatabase) Wait()