Documentation ¶
Index ¶
Constants ¶
View Source
const ( GrafanaAPIUsersBMKey = "GrafanaAPIUsers" ConfluenceAPIUsersBMKey = "ConfluenceServerAPIUsers" )
View Source
const ( MetadataBinName = "Metadata" AccountBinName = "Account" CredentialsBinName = "Credentials" VersionAttrName = "Version" GrafanaAPIUserNamespace = "GrafanaAPIUser" ConfluenceServerBasicUserNamespace = "ConfluenceServerBasicUser" )
View Source
const (
VersionLevel_1 = "1"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountViewV1 ¶
type AccountViewV1 struct { Email string `json:"Email"` Alias string `json:"Alias,omitempty"` //Optional arg. Won't be returned if missing. }
AccountViewV1 - Creation account details
func (AccountViewV1) GetFields ¶
func (a AccountViewV1) GetFields() logrus.Fields
func (AccountViewV1) IsValid ¶
func (a AccountViewV1) IsValid() (bool, error)
IsValid - returns true if model is valid. Returns false if invalid and includes a non-nil error
type BearerToken ¶
type BearerToken struct {
Token string
}
func (BearerToken) GetFields ¶
func (a BearerToken) GetFields() logrus.Fields
type ConfluenceServerUser ¶
type CredentialsV1 ¶
type CredentialsV1 struct { GrafanaAPIUsers map[string]common.GrafanaUserV1 ConfluenceServerAPIUsers map[string]common.ConfluenceServerUserV1 }
CredentialsV1 - CredentialsV1 for various graph and storage services
func (CredentialsV1) GetFields ¶
func (c CredentialsV1) GetFields() logrus.Fields
type CredentialsView1 ¶
type CredentialsView1 struct { GrafanaAPIUsers map[string]GrafanaAPIUser `json:"GrafanaAPIUsers"` ConfluenceServerUsers map[string]ConfluenceServerUser `json:"ConfluenceServerUser"` }
Credentials - Credentials for various graph and storage services
type GrafanaAPIUser ¶
GrafanaAPIUser - Grafana user without API key information
type MetadataV1 ¶
MetadataV1 - Record metadata
func (MetadataV1) GetFields ¶
func (m MetadataV1) GetFields() logrus.Fields
type MetadataViewV1 ¶
type MetadataViewV1 struct { PrimaryKey string `json:"PrimaryKey"` LastUpdate string `json:"LastUpdate"` CreateTimeUTC string `json:"CreateTimeUTC"` Version string `json:"Version"` }
MetadataViewV1 - Record metadata
type Record ¶
type Record interface { //GetFields - returns logrus fields for logging GetFields() logrus.Fields //ToASBinSlice - converts record to bin map. Used to write record to db in the latest record format ToASBinSlice() []*aerospike.Bin //ToRecordViewV1 - converts to v1 record view ToRecordViewV1() RecordViewV1 //SetUserCredentialsV1 - Adds input credentials to record. Does not overwrite any existing records SetUserCredentialsV1(*logrus.Logger, map[string]common.GrafanaUserV1, map[string]common.ConfluenceServerUserV1) }
type RecordV1 ¶
type RecordV1 struct { Metadata MetadataV1 `json:"Metadata"` Account AccountV1 `json:"Account"` Credentials CredentialsV1 `json:"Credentials"` }
Record - Aerospike configuration + credentials data
func (*RecordV1) SetUserCredentialsV1 ¶
func (r *RecordV1) SetUserCredentialsV1(logger *logrus.Logger, grafanaUsers map[string]common.GrafanaUserV1, confluenceUsers map[string]common.ConfluenceServerUserV1)
Add user details to record. Does not overwrite existing users
func (*RecordV1) ToASBinSlice ¶
func (r *RecordV1) ToASBinSlice() []*aerospike.Bin
ToASBinSlice - converts to aerospike bins. Currently writes record in recordv1 format
func (*RecordV1) ToRecordViewV1 ¶
func (r *RecordV1) ToRecordViewV1() RecordViewV1
type RecordViewV1 ¶
type RecordViewV1 struct { Metadata MetadataViewV1 `json:"Metadata"` Account AccountViewV1 `json:"Account"` Credentials CredentialsView1 `json:"Credentials"` }
RecordViewV1 - Aerospike configuration + credentials data
Source Files ¶
Click to show internal directories.
Click to hide internal directories.