Documentation
¶
Index ¶
- type APIToken
- type AddOnsDetails
- type DriverCredentials
- type PostgresSQLDriver
- func (p *PostgresSQLDriver) AddATeamMemberToProject(ctx context.Context, projectId string, memberData map[string]interface{}) error
- func (p *PostgresSQLDriver) AddSystemUserMetaInfo(ctx context.Context, doc *shared.DefaultDocumentStructure) (*shared.DefaultDocumentStructure, error)
- func (p *PostgresSQLDriver) AddTeamMetaInfo(ctx context.Context, docs []*protobuff.SystemUser) ([]*protobuff.SystemUser, error)
- func (p *PostgresSQLDriver) BlacklistAToken(ctx context.Context, token map[string]interface{}) error
- func (p *PostgresSQLDriver) CheckProjectName(ctx context.Context, name string) error
- func (p *PostgresSQLDriver) CheckTokenBlacklisted(ctx context.Context, tokenId string) error
- func (p *PostgresSQLDriver) CreateProject(ctx context.Context, project *protobuff.Project) (*protobuff.Project, error)
- func (p *PostgresSQLDriver) CreateSystemUser(ctx context.Context, user *protobuff.SystemUser) (*protobuff.SystemUser, error)
- func (p *PostgresSQLDriver) DeleteProjectFromSystem(ctx context.Context, projectId string) error
- func (p *PostgresSQLDriver) DeleteWebhook(ctx context.Context, projectId, hookId string) error
- func (p *PostgresSQLDriver) FindOrganizationAdmin(ctx context.Context, orgId string) (*protobuff.SystemUser, error)
- func (p *PostgresSQLDriver) GetATeamMemberFromProject(ctx context.Context, projectId string, memberID string) error
- func (p *PostgresSQLDriver) GetOrganizations(ctx context.Context, userId string) (*shared.SearchResponse[protobuff.Organization], error)
- func (p *PostgresSQLDriver) GetProject(ctx context.Context, id string) (*protobuff.Project, error)
- func (p *PostgresSQLDriver) GetSystemUser(ctx context.Context, id string) (*protobuff.SystemUser, error)
- func (p *PostgresSQLDriver) GetSystemUserByEmail(ctx context.Context, email string) (*protobuff.SystemUser, error)
- func (p *PostgresSQLDriver) GetSystemUserByUsername(ctx context.Context, username string) (*protobuff.SystemUser, error)
- func (p *PostgresSQLDriver) GetSystemUsers(ctx context.Context, keys []string) (map[string]*protobuff.SystemUser, error)
- func (p *PostgresSQLDriver) ListAllProjects(ctx context.Context, userId string) ([]*protobuff.Project, error)
- func (p *PostgresSQLDriver) ListAllUsers(ctx context.Context) ([]*protobuff.SystemUser, error)
- func (p *PostgresSQLDriver) ListFunctions(ctx context.Context, param *shared.CommonSystemParams) (*shared.SearchResponse[protobuff.CloudFunction], error)
- func (p *PostgresSQLDriver) ListProjects(ctx context.Context, param *shared.CommonSystemParams) (*shared.SearchResponse[protobuff.Project], error)
- func (p *PostgresSQLDriver) ListTeams(ctx context.Context, projectId string) ([]*protobuff.SystemUser, error)
- func (p *PostgresSQLDriver) RemoveATeamMemberFromProject(ctx context.Context, projectId string, memberID string) error
- func (p *PostgresSQLDriver) RunMigration() error
- func (p *PostgresSQLDriver) SaveRawData(ctx context.Context, collection string, data map[string]interface{}) error
- func (p *PostgresSQLDriver) SearchResource(ctx context.Context, param *shared.CommonSystemParams) (*shared.SearchResponse[any], error)
- func (p *PostgresSQLDriver) SearchUsers(ctx context.Context, param *shared.CommonSystemParams) (*shared.SearchResponse[protobuff.SystemUser], error)
- func (p *PostgresSQLDriver) UpdateProject(ctx context.Context, project *protobuff.Project, replace bool) error
- func (p *PostgresSQLDriver) UpdateSystemUser(ctx context.Context, user *protobuff.SystemUser, replace bool) error
- type Project
- type UsagesTracking
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIToken ¶
type APIToken struct {
ProjectID string `json:"project_id"`
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty" firestore:"name,omitempty"`
Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty" firestore:"token,omitempty"`
Role string `protobuf:"bytes,3,opt,name=role,proto3" json:"role,omitempty" firestore:"role,omitempty"`
Expire string `protobuf:"bytes,4,opt,name=expire,proto3" json:"expire,omitempty" firestore:"expire,omitempty"`
}
type AddOnsDetails ¶
type AddOnsDetails struct {
ProjectID string `json:"project_id"`
Locals []string `protobuf:"bytes,1,rep,name=locals,proto3" json:"locals,omitempty" firestore:"locals,omitempty"`
SystemGraphqlHooks bool `` /* 161-byte string literal not displayed */
RevisionHistory bool `` /* 146-byte string literal not displayed */
EnableAuth bool `protobuf:"bytes,4,opt,name=enable_auth,proto3" json:"enable_auth,omitempty" firestore:"enable_auth,omitempty"`
}
type DriverCredentials ¶
type DriverCredentials struct {
ProjectID string `json:"project_id"`
Engine string `protobuf:"bytes,1,opt,name=engine,proto3" json:"engine,omitempty"`
Host string `protobuf:"bytes,2,opt,name=host,proto3" json:"host,omitempty"`
Port string `protobuf:"bytes,3,opt,name=port,proto3" json:"port,omitempty"`
User string `protobuf:"bytes,4,opt,name=user,proto3" json:"user,omitempty"`
Password string `protobuf:"bytes,5,opt,name=password,proto3" json:"password,omitempty"`
Database string `protobuf:"bytes,6,opt,name=database,proto3" json:"database,omitempty"`
// for firebase
FirebaseProjectId string `protobuf:"bytes,7,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"`
FirebaseProjectCredentialJson string `` /* 126-byte string literal not displayed */
// for dynamodb
AccessKey string `protobuf:"bytes,9,opt,name=access_key,json=accessKey,proto3" json:"access_key,omitempty"`
SecretKey string `protobuf:"bytes,10,opt,name=secret_key,json=secretKey,proto3" json:"secret_key,omitempty"`
}
type PostgresSQLDriver ¶ added in v0.0.2
type PostgresSQLDriver struct {
Gorm *gorm.DB
DriverCredential *protobuff.DriverCredentials
}
func GetSystemSQLDriver ¶
func GetSystemSQLDriver(driverCredentials *protobuff.DriverCredentials) (*PostgresSQLDriver, error)
func (*PostgresSQLDriver) AddATeamMemberToProject ¶ added in v0.0.2
func (*PostgresSQLDriver) AddSystemUserMetaInfo ¶ added in v0.0.2
func (p *PostgresSQLDriver) AddSystemUserMetaInfo(ctx context.Context, doc *shared.DefaultDocumentStructure) (*shared.DefaultDocumentStructure, error)
func (*PostgresSQLDriver) AddTeamMetaInfo ¶ added in v0.0.2
func (p *PostgresSQLDriver) AddTeamMetaInfo(ctx context.Context, docs []*protobuff.SystemUser) ([]*protobuff.SystemUser, error)
func (*PostgresSQLDriver) BlacklistAToken ¶ added in v0.0.2
func (p *PostgresSQLDriver) BlacklistAToken(ctx context.Context, token map[string]interface{}) error
func (*PostgresSQLDriver) CheckProjectName ¶ added in v0.0.2
func (p *PostgresSQLDriver) CheckProjectName(ctx context.Context, name string) error
func (*PostgresSQLDriver) CheckTokenBlacklisted ¶ added in v0.0.2
func (p *PostgresSQLDriver) CheckTokenBlacklisted(ctx context.Context, tokenId string) error
func (*PostgresSQLDriver) CreateProject ¶ added in v0.0.2
func (*PostgresSQLDriver) CreateSystemUser ¶ added in v0.0.2
func (p *PostgresSQLDriver) CreateSystemUser(ctx context.Context, user *protobuff.SystemUser) (*protobuff.SystemUser, error)
func (*PostgresSQLDriver) DeleteProjectFromSystem ¶ added in v0.0.2
func (p *PostgresSQLDriver) DeleteProjectFromSystem(ctx context.Context, projectId string) error
func (*PostgresSQLDriver) DeleteWebhook ¶ added in v0.0.2
func (p *PostgresSQLDriver) DeleteWebhook(ctx context.Context, projectId, hookId string) error
func (*PostgresSQLDriver) FindOrganizationAdmin ¶ added in v0.0.2
func (p *PostgresSQLDriver) FindOrganizationAdmin(ctx context.Context, orgId string) (*protobuff.SystemUser, error)
func (*PostgresSQLDriver) GetATeamMemberFromProject ¶ added in v0.0.2
func (*PostgresSQLDriver) GetOrganizations ¶ added in v0.0.2
func (p *PostgresSQLDriver) GetOrganizations(ctx context.Context, userId string) (*shared.SearchResponse[protobuff.Organization], error)
func (*PostgresSQLDriver) GetProject ¶ added in v0.0.2
func (*PostgresSQLDriver) GetSystemUser ¶ added in v0.0.2
func (p *PostgresSQLDriver) GetSystemUser(ctx context.Context, id string) (*protobuff.SystemUser, error)
func (*PostgresSQLDriver) GetSystemUserByEmail ¶ added in v0.0.2
func (p *PostgresSQLDriver) GetSystemUserByEmail(ctx context.Context, email string) (*protobuff.SystemUser, error)
func (*PostgresSQLDriver) GetSystemUserByUsername ¶ added in v0.0.2
func (p *PostgresSQLDriver) GetSystemUserByUsername(ctx context.Context, username string) (*protobuff.SystemUser, error)
func (*PostgresSQLDriver) GetSystemUsers ¶ added in v0.0.2
func (p *PostgresSQLDriver) GetSystemUsers(ctx context.Context, keys []string) (map[string]*protobuff.SystemUser, error)
func (*PostgresSQLDriver) ListAllProjects ¶ added in v0.0.2
func (*PostgresSQLDriver) ListAllUsers ¶ added in v0.0.2
func (p *PostgresSQLDriver) ListAllUsers(ctx context.Context) ([]*protobuff.SystemUser, error)
func (*PostgresSQLDriver) ListFunctions ¶ added in v0.0.2
func (p *PostgresSQLDriver) ListFunctions(ctx context.Context, param *shared.CommonSystemParams) (*shared.SearchResponse[protobuff.CloudFunction], error)
func (*PostgresSQLDriver) ListProjects ¶ added in v0.0.2
func (p *PostgresSQLDriver) ListProjects(ctx context.Context, param *shared.CommonSystemParams) (*shared.SearchResponse[protobuff.Project], error)
func (*PostgresSQLDriver) ListTeams ¶ added in v0.0.2
func (p *PostgresSQLDriver) ListTeams(ctx context.Context, projectId string) ([]*protobuff.SystemUser, error)
func (*PostgresSQLDriver) RemoveATeamMemberFromProject ¶ added in v0.0.2
func (*PostgresSQLDriver) RunMigration ¶ added in v0.0.2
func (p *PostgresSQLDriver) RunMigration() error
func (*PostgresSQLDriver) SaveRawData ¶ added in v0.0.2
func (*PostgresSQLDriver) SearchResource ¶ added in v0.0.2
func (p *PostgresSQLDriver) SearchResource(ctx context.Context, param *shared.CommonSystemParams) (*shared.SearchResponse[any], error)
func (*PostgresSQLDriver) SearchUsers ¶ added in v0.0.2
func (p *PostgresSQLDriver) SearchUsers(ctx context.Context, param *shared.CommonSystemParams) (*shared.SearchResponse[protobuff.SystemUser], error)
func (*PostgresSQLDriver) UpdateProject ¶ added in v0.0.2
func (*PostgresSQLDriver) UpdateSystemUser ¶ added in v0.0.2
func (p *PostgresSQLDriver) UpdateSystemUser(ctx context.Context, user *protobuff.SystemUser, replace bool) error
type Project ¶
type Project struct {
XKey string `protobuf:"bytes,1,opt,name=_key,json=Key,proto3" json:"_key,omitempty" firestore:"_key,omitempty"`
Id string `gorm:"primaryKey;autoIncrement:false" protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty" firestore:"id,omitempty"`
ProjectName string `` /* 129-byte string literal not displayed */
ProjectDescription string `` /* 157-byte string literal not displayed */
Schema datatypes.JSONMap `protobuf:"bytes,5,opt,name=schema,proto3" json:"schema,omitempty" firestore:"schema,omitempty"`
CreatedAt string `protobuf:"bytes,6,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty" firestore:"created_at,omitempty"`
UpdatedAt string `protobuf:"bytes,7,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty" firestore:"updated_at,omitempty"`
ExpireAt string `protobuf:"bytes,8,opt,name=expire_at,json=expireAt,proto3" json:"expire_at,omitempty" firestore:"expire_at,omitempty"`
Plugins datatypes.JSONMap `` /* 185-byte string literal not displayed */
Addons *AddOnsDetails `protobuf:"bytes,10,opt,name=addons,proto3" json:"addons,omitempty" firestore:"addons,omitempty"`
Tokens []*APIToken `gorm:"foreignKey:ProjectID" protobuf:"bytes,11,rep,name=tokens,proto3" json:"tokens,omitempty" firestore:"tokens,omitempty"`
Roles datatypes.JSONMap `` /* 180-byte string literal not displayed */
Driver *DriverCredentials `gorm:"foreignKey:ProjectID" protobuf:"bytes,13,opt,name=driver,proto3" json:"driver,omitempty" firestore:"driver,omitempty"`
TempBanned bool `` /* 127-byte string literal not displayed */
Plan string `protobuf:"bytes,15,opt,name=plan,proto3" json:"plan,omitempty" firestore:"plan,omitempty"`
TrialEnds string `protobuf:"bytes,16,opt,name=trial_ends,json=trialEnds,proto3" json:"trial_ends,omitempty" firestore:"trial_ends,omitempty"`
FromExample string `` /* 130-byte string literal not displayed */
Limits *UsagesTracking `gorm:"foreignKey:ProjectID" protobuf:"bytes,18,opt,name=limits,proto3" json:"limits,omitempty" firestore:"limits,omitempty"`
}
Project user project
type UsagesTracking ¶
type UsagesTracking struct {
ProjectID string `json:"project_id"`
ApiCalls uint32 `protobuf:"varint,1,opt,name=api_calls,json=apiCalls,proto3" json:"api_calls,omitempty" firestore:"api_calls,omitempty"`
ApiBandwidth float64 `` /* 135-byte string literal not displayed */
MediaStorage float64 `` /* 135-byte string literal not displayed */
MediaBandwidth float64 `` /* 143-byte string literal not displayed */
NumberOfMedia float64 `` /* 142-byte string literal not displayed */
NumberOfRecords float64 `` /* 150-byte string literal not displayed */
}
Click to show internal directories.
Click to hide internal directories.