2020-10-19 13:25:42 +00:00
|
|
|
package acl
|
|
|
|
|
|
|
|
import (
|
|
|
|
acl "github.com/nspcc-dev/neofs-api-go/v2/acl/grpc"
|
2021-11-16 17:30:55 +00:00
|
|
|
"github.com/nspcc-dev/neofs-api-go/v2/rpc/message"
|
2020-10-19 13:25:42 +00:00
|
|
|
)
|
|
|
|
|
2020-11-13 11:31:53 +00:00
|
|
|
func (f *HeaderFilter) MarshalJSON() ([]byte, error) {
|
2021-03-12 12:57:23 +00:00
|
|
|
return message.MarshalJSON(f)
|
2020-11-13 11:31:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (f *HeaderFilter) UnmarshalJSON(data []byte) error {
|
2021-03-12 12:57:23 +00:00
|
|
|
return message.UnmarshalJSON(f, data, new(acl.EACLRecord_Filter))
|
2020-11-13 11:31:53 +00:00
|
|
|
}
|
2020-11-13 11:40:57 +00:00
|
|
|
|
|
|
|
func (t *Target) MarshalJSON() ([]byte, error) {
|
2021-03-12 12:57:23 +00:00
|
|
|
return message.MarshalJSON(t)
|
2020-11-13 11:40:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (t *Target) UnmarshalJSON(data []byte) error {
|
2021-03-12 12:57:23 +00:00
|
|
|
return message.UnmarshalJSON(t, data, new(acl.EACLRecord_Target))
|
2020-11-13 11:40:57 +00:00
|
|
|
}
|
2020-11-13 11:48:19 +00:00
|
|
|
|
|
|
|
func (r *Record) MarshalJSON() ([]byte, error) {
|
2021-03-12 12:57:23 +00:00
|
|
|
return message.MarshalJSON(r)
|
2020-11-13 11:48:19 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (r *Record) UnmarshalJSON(data []byte) error {
|
2021-03-12 12:57:23 +00:00
|
|
|
return message.UnmarshalJSON(r, data, new(acl.EACLRecord))
|
2020-11-13 11:48:19 +00:00
|
|
|
}
|
2020-11-13 11:55:45 +00:00
|
|
|
|
|
|
|
func (t *Table) MarshalJSON() ([]byte, error) {
|
2021-03-12 12:57:23 +00:00
|
|
|
return message.MarshalJSON(t)
|
2020-11-13 11:55:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (t *Table) UnmarshalJSON(data []byte) error {
|
2021-03-12 12:57:23 +00:00
|
|
|
return message.UnmarshalJSON(t, data, new(acl.EACLTable))
|
2020-11-13 11:55:45 +00:00
|
|
|
}
|
2020-11-13 12:00:03 +00:00
|
|
|
|
|
|
|
func (l *TokenLifetime) MarshalJSON() ([]byte, error) {
|
2021-03-12 12:57:23 +00:00
|
|
|
return message.MarshalJSON(l)
|
2020-11-13 12:00:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (l *TokenLifetime) UnmarshalJSON(data []byte) error {
|
2021-03-12 12:57:23 +00:00
|
|
|
return message.UnmarshalJSON(l, data, new(acl.BearerToken_Body_TokenLifetime))
|
2020-11-13 12:00:03 +00:00
|
|
|
}
|
2020-11-13 12:03:29 +00:00
|
|
|
|
|
|
|
func (bt *BearerTokenBody) MarshalJSON() ([]byte, error) {
|
2021-03-12 12:57:23 +00:00
|
|
|
return message.MarshalJSON(bt)
|
2020-11-13 12:03:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (bt *BearerTokenBody) UnmarshalJSON(data []byte) error {
|
2021-03-12 12:57:23 +00:00
|
|
|
return message.UnmarshalJSON(bt, data, new(acl.BearerToken_Body))
|
2020-11-13 12:03:29 +00:00
|
|
|
}
|
2020-11-13 12:08:37 +00:00
|
|
|
|
|
|
|
func (bt *BearerToken) MarshalJSON() ([]byte, error) {
|
2021-03-12 12:57:23 +00:00
|
|
|
return message.MarshalJSON(bt)
|
2020-11-13 12:08:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (bt *BearerToken) UnmarshalJSON(data []byte) error {
|
2021-03-12 12:57:23 +00:00
|
|
|
return message.UnmarshalJSON(bt, data, new(acl.BearerToken))
|
2020-11-13 12:08:37 +00:00
|
|
|
}
|