Documentation ¶
Overview ¶
Copyright 2024 Google LLC
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2024 Google LLC ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- func GetClient() *sp.Client
- func GetOrCreateClient(ctx context.Context, dbURI string) (*sp.Client, error)
- type DAO
- type DAOImpl
- func (dao *DAOImpl) InsertJobEntry(ctx context.Context, jobId, jobName, jobType, dialect, dbName string, ...) error
- func (dao *DAOImpl) InsertResourceEntry(ctx context.Context, ...) error
- func (dao *DAOImpl) UpdateJobState(ctx context.Context, jobId, state string) error
- func (dao *DAOImpl) UpdateResourceExternalId(ctx context.Context, resourceId, externalId string) error
- func (dao *DAOImpl) UpdateResourceState(ctx context.Context, resourceId, state string) error
- type StateData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DAO ¶
type DAO interface { InsertJobEntry(ctx context.Context, jobId, jobName, jobType, dialect, dbName string, jobData spanner.NullJSON) error UpdateJobState(ctx context.Context, jobId, state string) error InsertResourceEntry(ctx context.Context, resourceId, jobId, externalId, resourceName, resourceType string, resourceData spanner.NullJSON) error UpdateResourceState(ctx context.Context, resourceId, state string) error UpdateResourceExternalId(ctx context.Context, resourceId, externalId string) error }
type DAOImpl ¶
type DAOImpl struct{}
func (*DAOImpl) InsertJobEntry ¶
func (dao *DAOImpl) InsertJobEntry(ctx context.Context, jobId, jobName, jobType, dialect, dbName string, jobData spanner.NullJSON) error
Insert a job entry into the SMT_JOB table.
func (*DAOImpl) InsertResourceEntry ¶
func (dao *DAOImpl) InsertResourceEntry(ctx context.Context, resourceId, jobId, externalId, resourceName, resourceType string, resourceData spanner.NullJSON) error
Insert an entry into the SMT_RESOURCE table.
func (*DAOImpl) UpdateJobState ¶
Update the state of the SMT job.