func getPreresolved(env jutil.Env, obj jutil.Object) (*naming.MountEntry, error) { jMountEntry, err := jutil.JObjectField(env, obj, "preresolved", mountEntrySign) if err != nil { return nil, err } if !jMountEntry.IsNull() { var mountEntry naming.MountEntry if err := jutil.GoVomCopy(env, obj, jnamespace.JMountEntryClass, &mountEntry); err != nil { return nil, err } return &mountEntry, nil } return nil, nil }
func getDuration(env jutil.Env, obj jutil.Object, field string) (*time.Duration, error) { jDuration, err := jutil.JObjectField(env, obj, field, jutil.DurationSign) if err != nil { return nil, err } if !jDuration.IsNull() { duration, err := jutil.GoDuration(env, jDuration) if err != nil { return nil, err } return &duration, nil } return nil, nil }
func getAuthorizer(env jutil.Env, obj jutil.Object, field string) (security.Authorizer, error) { jAuthorizer, err := jutil.JObjectField(env, obj, field, authorizerSign) if err != nil { return nil, err } if !jAuthorizer.IsNull() { auth, err := jsecurity.GoAuthorizer(env, jAuthorizer) if err != nil { return nil, err } return auth, nil } return nil, nil }