refractor: fix typo in object storage.go (#3374)
fix typo Signed-off-by: Zyyeric <eric1976808123@gmail.com>
This commit is contained in:
parent
c49bd20699
commit
b7fdbcbff9
|
|
@ -157,7 +157,7 @@ func (s *service) updateModelConfig(ctx context.Context, name string, version in
|
|||
|
||||
objectKey := types.MakeObjectKeyOfModelConfigFile(name)
|
||||
var pbModelConfig inference.ModelConfig
|
||||
reader, err := s.objectStorage.GetOject(ctx, s.config.Trainer.BucketName, objectKey)
|
||||
reader, err := s.objectStorage.GetObject(ctx, s.config.Trainer.BucketName, objectKey)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -158,19 +158,19 @@ func (mr *MockObjectStorageMockRecorder) GetObjectMetadatas(ctx, bucketName, pre
|
|||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetObjectMetadatas", reflect.TypeOf((*MockObjectStorage)(nil).GetObjectMetadatas), ctx, bucketName, prefix, marker, delimiter, limit)
|
||||
}
|
||||
|
||||
// GetOject mocks base method.
|
||||
func (m *MockObjectStorage) GetOject(ctx context.Context, bucketName, objectKey string) (io.ReadCloser, error) {
|
||||
// GetObject mocks base method.
|
||||
func (m *MockObjectStorage) GetObject(ctx context.Context, bucketName, objectKey string) (io.ReadCloser, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "GetOject", ctx, bucketName, objectKey)
|
||||
ret := m.ctrl.Call(m, "GetObject", ctx, bucketName, objectKey)
|
||||
ret0, _ := ret[0].(io.ReadCloser)
|
||||
ret1, _ := ret[1].(error)
|
||||
return ret0, ret1
|
||||
}
|
||||
|
||||
// GetOject indicates an expected call of GetOject.
|
||||
func (mr *MockObjectStorageMockRecorder) GetOject(ctx, bucketName, objectKey any) *gomock.Call {
|
||||
// GetObject indicates an expected call of GetObject.
|
||||
func (mr *MockObjectStorageMockRecorder) GetObject(ctx, bucketName, objectKey any) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOject", reflect.TypeOf((*MockObjectStorage)(nil).GetOject), ctx, bucketName, objectKey)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetObject", reflect.TypeOf((*MockObjectStorage)(nil).GetObject), ctx, bucketName, objectKey)
|
||||
}
|
||||
|
||||
// GetSignURL mocks base method.
|
||||
|
|
|
|||
|
|
@ -115,8 +115,8 @@ type ObjectStorage interface {
|
|||
// GetObjectMetadatas returns the metadata of the objects.
|
||||
GetObjectMetadatas(ctx context.Context, bucketName, prefix, marker, delimiter string, limit int64) (*ObjectMetadatas, error)
|
||||
|
||||
// GetOject returns data of object.
|
||||
GetOject(ctx context.Context, bucketName, objectKey string) (io.ReadCloser, error)
|
||||
// GetObject returns data of object.
|
||||
GetObject(ctx context.Context, bucketName, objectKey string) (io.ReadCloser, error)
|
||||
|
||||
// PutObject puts data of object.
|
||||
PutObject(ctx context.Context, bucketName, objectKey, digest string, reader io.Reader) error
|
||||
|
|
|
|||
|
|
@ -164,8 +164,8 @@ func (o *obs) GetObjectMetadatas(ctx context.Context, bucketName, prefix, marker
|
|||
}, nil
|
||||
}
|
||||
|
||||
// GetOject returns data of object.
|
||||
func (o *obs) GetOject(ctx context.Context, bucketName, objectKey string) (io.ReadCloser, error) {
|
||||
// GetObject returns data of object.
|
||||
func (o *obs) GetObject(ctx context.Context, bucketName, objectKey string) (io.ReadCloser, error) {
|
||||
resp, err := o.client.GetObject(&huaweiobs.GetObjectInput{
|
||||
GetObjectMetadataInput: huaweiobs.GetObjectMetadataInput{
|
||||
Bucket: bucketName,
|
||||
|
|
|
|||
|
|
@ -170,8 +170,8 @@ func (o *oss) GetObjectMetadatas(ctx context.Context, bucketName, prefix, marker
|
|||
}, nil
|
||||
}
|
||||
|
||||
// GetOject returns data of object.
|
||||
func (o *oss) GetOject(ctx context.Context, bucketName, objectKey string) (io.ReadCloser, error) {
|
||||
// GetObject returns data of object.
|
||||
func (o *oss) GetObject(ctx context.Context, bucketName, objectKey string) (io.ReadCloser, error) {
|
||||
bucket, err := o.client.Bucket(bucketName)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
|
|||
|
|
@ -179,8 +179,8 @@ func (s *s3) GetObjectMetadatas(ctx context.Context, bucketName, prefix, marker,
|
|||
}, nil
|
||||
}
|
||||
|
||||
// GetOject returns data of object.
|
||||
func (s *s3) GetOject(ctx context.Context, bucketName, objectKey string) (io.ReadCloser, error) {
|
||||
// GetObject returns data of object.
|
||||
func (s *s3) GetObject(ctx context.Context, bucketName, objectKey string) (io.ReadCloser, error) {
|
||||
resp, err := s.client.GetObjectWithContext(ctx, &awss3.GetObjectInput{
|
||||
Bucket: aws.String(bucketName),
|
||||
Key: aws.String(objectKey),
|
||||
|
|
|
|||
Loading…
Reference in New Issue