github.com/akamai/AkamaiOPEN-edgegrid-golang/v8@v8.1.0/pkg/imaging/imaging.go (about) 1 // Package imaging provides access to the Akamai Image & Video Manager APIs 2 package imaging 3 4 import ( 5 "errors" 6 7 "github.com/akamai/AkamaiOPEN-edgegrid-golang/v8/pkg/session" 8 ) 9 10 var ( 11 // ErrStructValidation is returned when given struct validation failed 12 ErrStructValidation = errors.New("struct validation") 13 ) 14 15 type ( 16 // Imaging is the api interface for Image and Video Manager 17 Imaging interface { 18 Policies 19 PolicySets 20 } 21 22 imaging struct { 23 session.Session 24 } 25 26 // Option defines an Image and Video Manager option 27 Option func(*imaging) 28 29 // ClientFunc is a Image and Video Manager client new method, this can be used for mocking 30 ClientFunc func(sess session.Session, opts ...Option) Imaging 31 ) 32 33 // Client returns a new Image and Video Manager Client instance with the specified controller 34 func Client(sess session.Session, opts ...Option) Imaging { 35 c := &imaging{ 36 Session: sess, 37 } 38 39 for _, opt := range opts { 40 opt(c) 41 } 42 return c 43 }