github.com/TrueCloudLab/frostfs-api-go/v2@v2.0.0-20230228134343-196241c4e79a/acl/json.go (about) 1 package acl 2 3 import ( 4 acl "github.com/TrueCloudLab/frostfs-api-go/v2/acl/grpc" 5 "github.com/TrueCloudLab/frostfs-api-go/v2/rpc/message" 6 ) 7 8 func (f *HeaderFilter) MarshalJSON() ([]byte, error) { 9 return message.MarshalJSON(f) 10 } 11 12 func (f *HeaderFilter) UnmarshalJSON(data []byte) error { 13 return message.UnmarshalJSON(f, data, new(acl.EACLRecord_Filter)) 14 } 15 16 func (t *Target) MarshalJSON() ([]byte, error) { 17 return message.MarshalJSON(t) 18 } 19 20 func (t *Target) UnmarshalJSON(data []byte) error { 21 return message.UnmarshalJSON(t, data, new(acl.EACLRecord_Target)) 22 } 23 24 func (r *Record) MarshalJSON() ([]byte, error) { 25 return message.MarshalJSON(r) 26 } 27 28 func (r *Record) UnmarshalJSON(data []byte) error { 29 return message.UnmarshalJSON(r, data, new(acl.EACLRecord)) 30 } 31 32 func (t *Table) MarshalJSON() ([]byte, error) { 33 return message.MarshalJSON(t) 34 } 35 36 func (t *Table) UnmarshalJSON(data []byte) error { 37 return message.UnmarshalJSON(t, data, new(acl.EACLTable)) 38 } 39 40 func (l *TokenLifetime) MarshalJSON() ([]byte, error) { 41 return message.MarshalJSON(l) 42 } 43 44 func (l *TokenLifetime) UnmarshalJSON(data []byte) error { 45 return message.UnmarshalJSON(l, data, new(acl.BearerToken_Body_TokenLifetime)) 46 } 47 48 func (bt *BearerTokenBody) MarshalJSON() ([]byte, error) { 49 return message.MarshalJSON(bt) 50 } 51 52 func (bt *BearerTokenBody) UnmarshalJSON(data []byte) error { 53 return message.UnmarshalJSON(bt, data, new(acl.BearerToken_Body)) 54 } 55 56 func (bt *BearerToken) MarshalJSON() ([]byte, error) { 57 return message.MarshalJSON(bt) 58 } 59 60 func (bt *BearerToken) UnmarshalJSON(data []byte) error { 61 return message.UnmarshalJSON(bt, data, new(acl.BearerToken)) 62 }