Documentation
¶
Index ¶
- type APIToken
- type AddOnsDetails
- type DriverCredentials
- type PostgreSQLDriver
- func (p PostgreSQLDriver) AddATeamMemberToProject(ctx context.Context, projectId string, memberData map[string]interface{}) error
- func (p PostgreSQLDriver) AddSystemUserMetaInfo(ctx context.Context, doc *shared.DefaultDocumentStructure) (*shared.DefaultDocumentStructure, error)
- func (p PostgreSQLDriver) AddTeamMetaInfo(ctx context.Context, docs []*protobuff.SystemUser) ([]*protobuff.SystemUser, error)
- func (p PostgreSQLDriver) BlacklistAToken(ctx context.Context, token map[string]interface{}) error
- func (p PostgreSQLDriver) CheckProjectName(ctx context.Context, name string) error
- func (p PostgreSQLDriver) CheckTokenBlacklisted(ctx context.Context, tokenId string) error
- func (p PostgreSQLDriver) CreateProject(ctx context.Context, project *protobuff.Project) (*protobuff.Project, error)
- func (p PostgreSQLDriver) CreateSystemUser(ctx context.Context, user *protobuff.SystemUser) (*protobuff.SystemUser, error)
- func (p PostgreSQLDriver) DeleteProjectFromSystem(ctx context.Context, projectId string) error
- func (p PostgreSQLDriver) DeleteWebhook(ctx context.Context, projectId, hookId string) error
- func (p PostgreSQLDriver) FindOrganizationAdmin(ctx context.Context, orgId string) (*protobuff.SystemUser, error)
- func (p PostgreSQLDriver) GetATeamMemberFromProject(ctx context.Context, projectId string, memberID string) error
- func (p PostgreSQLDriver) GetOrganizations(ctx context.Context, userId string) (*shared.SearchResponse[protobuff.Organization], error)
- func (p PostgreSQLDriver) GetProject(ctx context.Context, id string) (*protobuff.Project, error)
- func (p PostgreSQLDriver) GetSystemUser(ctx context.Context, id string) (*protobuff.SystemUser, error)
- func (p PostgreSQLDriver) GetSystemUserByEmail(ctx context.Context, email string) (*protobuff.SystemUser, error)
- func (p PostgreSQLDriver) GetSystemUserByUsername(ctx context.Context, username string) (*protobuff.SystemUser, error)
- func (p PostgreSQLDriver) GetSystemUsers(ctx context.Context, keys []string) (map[string]*protobuff.SystemUser, error)
- func (p PostgreSQLDriver) ListAllProjects(ctx context.Context, userId string) ([]*protobuff.Project, error)
- func (p PostgreSQLDriver) ListAllUsers(ctx context.Context) ([]*protobuff.SystemUser, error)
- func (p PostgreSQLDriver) ListFunctions(ctx context.Context, param *shared.CommonSystemParams) (*shared.SearchResponse[protobuff.CloudFunction], error)
- func (p PostgreSQLDriver) ListProjects(ctx context.Context, param *shared.CommonSystemParams) (*shared.SearchResponse[protobuff.Project], error)
- func (p PostgreSQLDriver) ListTeams(ctx context.Context, projectId string) ([]*protobuff.SystemUser, error)
- func (p PostgreSQLDriver) RemoveATeamMemberFromProject(ctx context.Context, projectId string, memberID string) error
- func (p PostgreSQLDriver) RunMigration() error
- func (p PostgreSQLDriver) SaveRawData(ctx context.Context, collection string, data map[string]interface{}) error
- func (p PostgreSQLDriver) SearchResource(ctx context.Context, param *shared.CommonSystemParams) (*shared.SearchResponse[any], error)
- func (p PostgreSQLDriver) SearchUsers(ctx context.Context, param *shared.CommonSystemParams) (*shared.SearchResponse[protobuff.SystemUser], error)
- func (p PostgreSQLDriver) UpdateProject(ctx context.Context, project *protobuff.Project, replace bool) error
- func (p PostgreSQLDriver) 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 PostgreSQLDriver ¶
type PostgreSQLDriver struct {
Gorm *gorm.DB
DriverCredential *protobuff.DriverCredentials
}
func GetSystemSQLDriver ¶
func GetSystemSQLDriver(driverCredentials *protobuff.DriverCredentials) (*PostgreSQLDriver, error)
func (PostgreSQLDriver) AddATeamMemberToProject ¶
func (PostgreSQLDriver) AddSystemUserMetaInfo ¶
func (p PostgreSQLDriver) AddSystemUserMetaInfo(ctx context.Context, doc *shared.DefaultDocumentStructure) (*shared.DefaultDocumentStructure, error)
func (PostgreSQLDriver) AddTeamMetaInfo ¶
func (p PostgreSQLDriver) AddTeamMetaInfo(ctx context.Context, docs []*protobuff.SystemUser) ([]*protobuff.SystemUser, error)
func (PostgreSQLDriver) BlacklistAToken ¶
func (p PostgreSQLDriver) BlacklistAToken(ctx context.Context, token map[string]interface{}) error
func (PostgreSQLDriver) CheckProjectName ¶
func (p PostgreSQLDriver) CheckProjectName(ctx context.Context, name string) error
func (PostgreSQLDriver) CheckTokenBlacklisted ¶
func (p PostgreSQLDriver) CheckTokenBlacklisted(ctx context.Context, tokenId string) error
func (PostgreSQLDriver) CreateProject ¶
func (PostgreSQLDriver) CreateSystemUser ¶
func (p PostgreSQLDriver) CreateSystemUser(ctx context.Context, user *protobuff.SystemUser) (*protobuff.SystemUser, error)
func (PostgreSQLDriver) DeleteProjectFromSystem ¶
func (p PostgreSQLDriver) DeleteProjectFromSystem(ctx context.Context, projectId string) error
func (PostgreSQLDriver) DeleteWebhook ¶
func (p PostgreSQLDriver) DeleteWebhook(ctx context.Context, projectId, hookId string) error
func (PostgreSQLDriver) FindOrganizationAdmin ¶
func (p PostgreSQLDriver) FindOrganizationAdmin(ctx context.Context, orgId string) (*protobuff.SystemUser, error)
func (PostgreSQLDriver) GetATeamMemberFromProject ¶
func (PostgreSQLDriver) GetOrganizations ¶
func (p PostgreSQLDriver) GetOrganizations(ctx context.Context, userId string) (*shared.SearchResponse[protobuff.Organization], error)
func (PostgreSQLDriver) GetProject ¶
func (PostgreSQLDriver) GetSystemUser ¶
func (p PostgreSQLDriver) GetSystemUser(ctx context.Context, id string) (*protobuff.SystemUser, error)
func (PostgreSQLDriver) GetSystemUserByEmail ¶
func (p PostgreSQLDriver) GetSystemUserByEmail(ctx context.Context, email string) (*protobuff.SystemUser, error)
func (PostgreSQLDriver) GetSystemUserByUsername ¶
func (p PostgreSQLDriver) GetSystemUserByUsername(ctx context.Context, username string) (*protobuff.SystemUser, error)
func (PostgreSQLDriver) GetSystemUsers ¶
func (p PostgreSQLDriver) GetSystemUsers(ctx context.Context, keys []string) (map[string]*protobuff.SystemUser, error)
func (PostgreSQLDriver) ListAllProjects ¶
func (PostgreSQLDriver) ListAllUsers ¶
func (p PostgreSQLDriver) ListAllUsers(ctx context.Context) ([]*protobuff.SystemUser, error)
func (PostgreSQLDriver) ListFunctions ¶
func (p PostgreSQLDriver) ListFunctions(ctx context.Context, param *shared.CommonSystemParams) (*shared.SearchResponse[protobuff.CloudFunction], error)
func (PostgreSQLDriver) ListProjects ¶
func (p PostgreSQLDriver) ListProjects(ctx context.Context, param *shared.CommonSystemParams) (*shared.SearchResponse[protobuff.Project], error)
func (PostgreSQLDriver) ListTeams ¶
func (p PostgreSQLDriver) ListTeams(ctx context.Context, projectId string) ([]*protobuff.SystemUser, error)
func (PostgreSQLDriver) RemoveATeamMemberFromProject ¶
func (PostgreSQLDriver) RunMigration ¶
func (p PostgreSQLDriver) RunMigration() error
func (PostgreSQLDriver) SaveRawData ¶
func (PostgreSQLDriver) SearchResource ¶
func (p PostgreSQLDriver) SearchResource(ctx context.Context, param *shared.CommonSystemParams) (*shared.SearchResponse[any], error)
func (PostgreSQLDriver) SearchUsers ¶
func (p PostgreSQLDriver) SearchUsers(ctx context.Context, param *shared.CommonSystemParams) (*shared.SearchResponse[protobuff.SystemUser], error)
func (PostgreSQLDriver) UpdateProject ¶
func (PostgreSQLDriver) UpdateSystemUser ¶
func (p PostgreSQLDriver) 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.