[#76] Make setter names more consistent

This will make the transition to a new codegen more seamless.
1. Setter should be named as the field itself.
2. Setter should accept 1 parameter.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
Evgenii Stratonikov 2024-04-26 11:54:35 +03:00
parent fa8f92d662
commit 0fe6b9adbb
10 changed files with 36 additions and 36 deletions

View file

@ -52,25 +52,22 @@ func (m *SessionToken_Body) SetSessionKey(v []byte) {
}
// SetObjectAddressContext sets object context of the session token.
func (m *SessionToken_Body) SetObjectSessionContext(v *ObjectSessionContext) {
func (m *SessionToken_Body) SetObject(v *ObjectSessionContext) {
m.Context = &SessionToken_Body_Object{
Object: v,
}
}
// SetContainerSessionContext sets container context of the session token.
func (m *SessionToken_Body) SetContainerSessionContext(v *ContainerSessionContext) {
// SetContainer sets container context of the session token.
func (m *SessionToken_Body) SetContainer(v *ContainerSessionContext) {
m.Context = &SessionToken_Body_Container{
Container: v,
}
}
// SetTarget specifies objects involved in the object session.
func (m *ObjectSessionContext) SetTarget(cnr *refs.ContainerID, objs []*refs.ObjectID) {
m.Target = &ObjectSessionContext_Target{
Container: cnr,
Objects: objs,
}
func (m *ObjectSessionContext) SetTarget(tgt *ObjectSessionContext_Target) {
m.Target = tgt
}
// SetVerb sets type of request for which the token is issued.
@ -147,8 +144,8 @@ func (m *RequestMetaHeader) GetNetworkMagic() uint64 {
return 0
}
// SetNetworkMagic sets NeoFS network magic.
func (m *RequestMetaHeader) SetNetworkMagic(v uint64) {
// SetMagicNumber sets NeoFS network magic.
func (m *RequestMetaHeader) SetMagicNumber(v uint64) {
m.MagicNumber = v
}