Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

storage: Rename New to Create #511

Merged
merged 1 commit into from
Mar 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.15

require (
github.com/Xuanwo/templateutils v0.0.0-20201216100309-46f73cd4e4b1
github.com/aos-dev/specs/go v0.0.0-20210304071525-10359b2459a5
github.com/aos-dev/specs/go v0.0.0-20210304082749-d044cb2d3362
github.com/dave/dst v0.26.2
github.com/golang/mock v1.5.0
github.com/google/uuid v1.2.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
github.com/Xuanwo/templateutils v0.0.0-20201216100309-46f73cd4e4b1 h1:SQ8kQujQ0yl39YBMU0xZ+yyfxx/qSWfGWlCPNzHp5kw=
github.com/Xuanwo/templateutils v0.0.0-20201216100309-46f73cd4e4b1/go.mod h1:x0qS7gfgEm24b8V9U+0zBEBAu/VpxZhO/+EWtpgEgDw=
github.com/aos-dev/specs/go v0.0.0-20210304071525-10359b2459a5 h1:pHz4FJVtzlxd4lou1qjU3MsSeWiWv3v9rNdxMjzkp5Q=
github.com/aos-dev/specs/go v0.0.0-20210304071525-10359b2459a5/go.mod h1:XTNlLZtPA1inITyDH5hNnQXVjvvKUvo+lurs5GYB8NA=
github.com/aos-dev/specs/go v0.0.0-20210304082749-d044cb2d3362 h1:QqfusB82p+7kHhzXMW/z9V+QHob3CIRxLwUY+L9Qk84=
github.com/aos-dev/specs/go v0.0.0-20210304082749-d044cb2d3362/go.mod h1:XTNlLZtPA1inITyDH5hNnQXVjvvKUvo+lurs5GYB8NA=
github.com/dave/dst v0.26.2 h1:lnxLAKI3tx7MgLNVDirFCsDTlTG9nKTk7GcptKcWSwY=
github.com/dave/dst v0.26.2/go.mod h1:UMDJuIRPfyUCC78eFuB+SV/WI8oDeyFDvM/JR6NI3IU=
github.com/dave/gopackages v0.0.0-20170318123100-46e7023ec56e/go.mod h1:i00+b/gKdIDIxuLDFob7ustLAVqhsZRk2qVZrArELGQ=
Expand Down
8 changes: 4 additions & 4 deletions types/operation.generated.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,9 @@ type Servicer interface {
type Storager interface {
String() string

// Create will create a new object without any api call.
Create(path string, pairs ...Pair) (o *Object)

// Delete will delete an Object from service.
Delete(path string, pairs ...Pair) (err error)
// DeleteWithContext will delete an Object from service.
Expand All @@ -161,9 +164,6 @@ type Storager interface {
// MetadataWithContext will return current storager metadata.
MetadataWithContext(ctx context.Context, pairs ...Pair) (meta *StorageMeta, err error)

// New will create a new object without any api call.
New(path string, pairs ...Pair) (o *Object)

// Read will read the file's data.
Read(path string, w io.Writer, pairs ...Pair) (n int64, err error)
// ReadWithContext will read the file's data.
Expand Down Expand Up @@ -216,11 +216,11 @@ type PairPolicy struct {
Reach bool

// pairs for interface Storager
Create bool
Delete bool
List bool
ListListMode bool
Metadata bool
New bool
Read bool
ReadSize bool
ReadOffset bool
Expand Down